ma, fmaf, fmal - floating-point multiply-add
#include <math.h>
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
long double fmal(long double x, long double y, long double z);
These functions shall compute (x * y) + z, rounded as one ternary operation: they shall compute the value (as if) to infinite precision and round once to the result format, according to the rounding mode characterized by the value of FLT_ROUNDS. * y) + z, rounded as one ternary operation.
If x or y are NaN, a NaN shall be returned.
If x multiplied by y is an exact infinity and z is also an infinity but with the opposite sign, a domain error shall occur, and either a NaN (if supported), or an implementation-defined value shall be returned.
If one of x and y is infinite, the other is zero, and z is not a NaN, a domain error shall occur, and either a NaN (if supported), or an implementation-defined value shall be returned.
If one of x and y is infinite, the other is zero, and z is a NaN, a NaN shall be returned and a domain error may occur.
If x* y is not 0*Inf nor Inf*0 and z is a NaN, a NaN .