Loading web-font TeX/Main/Regular
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ fma() [16/17]

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

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

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

The partial derivatives are

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

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

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

Definition at line 183 of file fma.hpp.