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

◆ fmax() [10/10]

var stan::math::fmax ( double  a,
const var b 
)
inline

Returns the maximum of a scalar and variable, promoting the scalar to a variable if it is larger (C99).

For fmax(a, b), if a is greater than b's value, then a fresh variable implementation wrapping a is returned, otherwise b is returned.

Parameters
aFirst value.
bSecond variable.
Returns
If the first value is larger than the second variable's value, return the first value promoted to a variable, otherwise return the second variable.

Definition at line 119 of file fmax.hpp.