Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ logical_or()

template<typename T1 , typename T2 >
int stan::math::logical_or ( T1  x1,
T2  x2 
)
inline

The logical or function which returns 1 if either argument is unequal to zero and 0 otherwise.

Equivalent to x1 != 0 || x2 != 0.

\[ \mbox{operator||}(x, y) = \begin{cases} 0 & \mbox{if } x, y=0 \\ 1 & \mbox{if } x \neq 0 \textrm{ or } y\neq0\\[6pt] 1 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \]

Template Parameters
T1type of first argument
T2type of second argument
Parameters
x1first argument
x2second argument
Returns
true if either x1 or x2 is not equal to 0.

Definition at line 29 of file logical_or.hpp.