FMA(3M)FMA(3M)


NAME
     fma, fmaf, fmal - floating multiply-add functions

SYNOPSIS
     #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);

DESCRIPTION
     These routines are not available for programs compiled with the O32
     ABI.

     Functions in the standard math library (libm.a) are referred to as -lm
     versions. Those in mathx library (libmx.a) are referred to as -lmx
     versions, and those in the the BSD math library (libm43.a) are
     referred to as -lm43 versions.  These routines are not available in
     the libmx or libm43 library.

     The fma functions return (x*y)+z singly, rounded as one ternary
     operation.

NOTES
     Long double operations on this system are only supported in round to
     nearest rounding mode (the default).  The system must be in round to
     nearest rounding mode when calling any of the long double functions,
     or incorrect answers will result.

RETURN VALUES
     The -lm and -lmx versions always return the default Quiet NaN and set
     errno to EDOM when a NaN is used as an argument.

     See matherr(3M) for a description of error handling for -lmx
     functions.

SEE ALSO
     math(3M), exp(3M)