]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/fma.3
sync
[thirdparty/man-pages.git] / man3 / fma.3
CommitLineData
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
8fma, 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 20Compile with \-std=c99; link with \-lm.
fea681da
MK
21.SH DESCRIPTION
22The
63aa9df0 23.BR fma ()
fea681da
MK
24function computes
25.IR x " * " y " + " z .
26The result is rounded according to the
27rounding mode determined by the value of FLT_ROUNDS.
4022b76e
MK
28FLT_ROUNDS indicates the implementation-defined rounding
29behaviour for floating-point addition,
30and has one of the following values:
31.IP \-1
32The rounding mode is not determinable.
33.IP 0
7440ec4c 34Rounding is towards 0.
4022b76e
MK
35.IP 1
36Rounding is towards nearest number.
37.IP 2
38Rounding is towards positive infinity.
39.IP 3
40Rounding is towards negative infinity.
41.PP
42Other values represent machine-dependent, non-standard rounding modes.
fea681da
MK
43.SH "CONFORMING TO"
44C99
45.SH "SEE ALSO"
d77a26b7 46.BR fenv (3),
fea681da
MK
47.BR remainder (3),
48.BR remquo (3)