]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/fma.3
Automated unformatting of parentheses using unformat_parens.sh
[thirdparty/man-pages.git] / man3 / fma.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL, 2002-07-27 Walter Harms
3 .\" Modified 2004-11-15, Added further text on FLT_ROUNDS
4 .\" as suggested by AEB and Fabian Kreutz
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 );
14 .br
15 .BI "float fmaf(float " x ", float " y ", float " z );
16 .br
17 .BI "long double fmal(long double " x ", long double " y ", long double " z );
18 .fi
19 .sp
20 Compile with \-std=c99; link with \-lm.
21 .SH DESCRIPTION
22 The
23 .BR fma ()
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.
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
34 Rounding is towards 0.
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.
43 .SH "CONFORMING TO"
44 C99
45 .SH "SEE ALSO"
46 .BR fenv (3),
47 .BR remainder (3),
48 .BR remquo (3)