Automatic Differentiation
 
Loading...
Searching...
No Matches
operator_logical_or.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_CORE_OPERATOR_LOGICAL_OR_HPP
2#define STAN_MATH_REV_CORE_OPERATOR_LOGICAL_OR_HPP
3
6
7namespace stan {
8namespace math {
9
18inline bool operator||(const var& x, const var& y) {
19 return x.val() || y.val();
20}
21
32template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
33inline bool operator||(const var& x, Arith y) {
34 return x.val() || y;
35}
36
47template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
48inline bool operator||(Arith x, const var& y) {
49 return x || y.val();
50}
51
52} // namespace math
53} // namespace stan
54#endif
bool operator||(const fvar< T > &x, const fvar< T > &y)
Return the logical disjunction of the values of the two arguments as defined by ||.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...