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

◆ fma() [11/17]

template<typename Tc , require_arithmetic_t< Tc > * = nullptr>
var stan::math::fma ( const var x,
const var y,
Tc &&  z 
)
inline

The fused multiply-add function for two variables and a value (C99).

This function returns the product of the first two arguments plus the third argument.

The partial derivatives are

\(\frac{\partial}{\partial x} (x * y) + z = y\), and

\(\frac{\partial}{\partial y} (x * y) + z = x\).

Template Parameters
Tctype of the summand
Parameters
xFirst multiplicand.
ySecond multiplicand.
zSummand.
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.

Definition at line 57 of file fma.hpp.