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

◆ fdim() [6/10]

template<typename T1 , typename T2 , require_all_arithmetic_t< T1, T2 > * = nullptr>
double stan::math::fdim ( T1  x,
T2  y 
)
inline

Return the positive difference of the specified values (C++11).

The function is defined by

fdim(x, y) = (x > y) ? (x - y) : 0.

Parameters
xFirst value.
ySecond value.
Returns
max(x- y, 0)

Definition at line 22 of file fdim.hpp.