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

◆ fma() [15/17]

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

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

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

The derivative is

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

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

Definition at line 160 of file fma.hpp.