std::fma

From Cppreference

Jump to: navigation, search
Defined in header <cmath>

float       fma( float x, float y, float z );
(C++11 feature)
double      fma( double x, double y, double z );
(C++11 feature)
long double fma( long double x, long double y, long double z );
(C++11 feature)

The fma functions compute (x*y) + z, rounded as one ternary operation, according to the rounding mode characterized by the value of FLT_ROUNDS.

[edit] Parameters

x, y, z - floating point values

[edit] Return value

(x*y) + z, rounded as one ternary operation

[edit] See also

remainder (C++11)
signed remainder of the division operation
(function)
remquo (C++11)
signed remainder as well as the three last bits of the division operation
(function)