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

◆ fma() [14/17]

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

The fused multiply-add function for a value, variable, and value (C99).

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

The derivative is

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

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

Definition at line 137 of file fma.hpp.