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

◆ fma() [10/17]

var stan::math::fma ( const var x,
const var y,
const var z 
)
inline

The fused multiply-add function for three variables (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\), and

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

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

Definition at line 31 of file fma.hpp.