fma, fmaf, fmal — floating-point multiply and 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) ; |
Note | |
---|---|
Compile with |
The fma
() function computes
x
* y
+ z
. The result is rounded
according to the rounding mode determined by the value of
FLT_ROUNDS
. FLT_ROUNDS
indicates the
implementation-defined rounding behavior for floating-point
addition, and has one of the following values:
The rounding mode is not determinable.
0
Rounding is towards 0.
1
Rounding is towards nearest number.
2
Rounding is towards positive infinity.
3
Rounding is towards negative infinity.
Other values represent machine-dependent, non-standard rounding modes.
This page is part of release 2.79 of the Linux man-pages
project. A
description of the project, and information about reporting
bugs, can be found at
http://www.kernel.org/doc/man-pages/.
Copyright 2002 Walter Harms (walter.harmsinformatik.uni-oldenburg.de) Distributed under GPL, 2002-07-27 Walter Harms Modified 2004-11-15, Added further text on FLT_ROUNDS as suggested by AEB and Fabian Kreutz |