]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2 | .\" Distributed under GPL, 2002-07-27 Walter Harms | |
4022b76e MK |
3 | .\" Modified 2004-11-15, Added further text on FLT_ROUNDS |
4 | .\" as suggested by AEB and Fabian Kreutz | |
fea681da MK |
5 | .\" |
6 | .TH FMA 3 2002-07-27 "" "Linux Programmer's Manual" | |
7 | .SH NAME | |
8 | fma, fmaf, fmal \- floating-point multiply and add | |
9 | .SH SYNOPSIS | |
10 | .nf | |
11 | .B #include <math.h> | |
12 | .sp | |
13 | .BI "double fma(double " x ", double " y ", double " z ); | |
d39541ec | 14 | .br |
fea681da | 15 | .BI "float fmaf(float " x ", float " y ", float " z ); |
d39541ec | 16 | .br |
fea681da MK |
17 | .BI "long double fmal(long double " x ", long double " y ", long double " z ); |
18 | .fi | |
19 | .sp | |
4d9b6984 | 20 | Compile with \-std=c99; link with \-lm. |
fea681da MK |
21 | .SH DESCRIPTION |
22 | The | |
63aa9df0 | 23 | .BR fma () |
fea681da MK |
24 | function computes |
25 | .IR x " * " y " + " z . | |
26 | The result is rounded according to the | |
27 | rounding mode determined by the value of FLT_ROUNDS. | |
4022b76e MK |
28 | FLT_ROUNDS indicates the implementation-defined rounding |
29 | behaviour for floating-point addition, | |
30 | and has one of the following values: | |
31 | .IP \-1 | |
32 | The rounding mode is not determinable. | |
33 | .IP 0 | |
7440ec4c | 34 | Rounding is towards 0. |
4022b76e MK |
35 | .IP 1 |
36 | Rounding is towards nearest number. | |
37 | .IP 2 | |
38 | Rounding is towards positive infinity. | |
39 | .IP 3 | |
40 | Rounding is towards negative infinity. | |
41 | .PP | |
42 | Other values represent machine-dependent, non-standard rounding modes. | |
fea681da MK |
43 | .SH "CONFORMING TO" |
44 | C99 | |
45 | .SH "SEE ALSO" | |
d77a26b7 | 46 | .BR fenv (3), |
fea681da MK |
47 | .BR remainder (3), |
48 | .BR remquo (3) |