FMA 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

fmaf, fma, fmal, fmaw, fmaq, fmall, fmadf, fmad, fmadl, fmadll - floating-point multiply-add

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float fmaf (float x, float y, float z);

extern double fma (double x, double y, double z);

extern long double fmal (long double x, long double y, long double z);

extern __float80 fmaw (__float80 x, __float80 y, __float80 z);

extern __float128 fmaq (__float128 x, __float128 y, __float128 z);

extern long_long_double fmall (long_long_double x, long_long_double y, long_long_double z);

extern decimal_float fmadf (decimal_float x, decimal_float y, decimal_float z);

extern decimal_double fmad (decimal_double x, decimal_double y, decimal_double z);

extern decimal_long_double fmadl (decimal_long_double x, decimal_long_double y, decimal_long_double z);

extern decimal_long_long_double fmadll (decimal_long_long_double x, decimal_long_long_double y, decimal_long_long_double z);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute x * y + z by computing the product exactly, then doing the addition with only a single rounding, with the rounding mode determined by the current value of FLT_ROUNDS.

Caution: The value of FLT_ROUNDS is implementation dependent. On some systems, it is fixed at a value that means the IEEE 754 default of round-to-nearest. On others, it is set to a value that reflects the current IEEE 754 rounding mode. On still others, it might be set to a value that means the rounding mode is indeterminate.


RETURN VALUES

Return the accurate value of x * y + z".

ERRORS

If any of the arguments is a NaN, the result is a NaN, but errno is not set. If any of the arguments is Infinity, the result may be Infinity, or a NaN, according to the rules of IEEE 754 arithmetic.

SEE ALSO

fegetround(3CW), fesetround(3CW).