1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
.\" Copyright 2002 Walter Harms (walter.harms@informatik.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
.\"
.TH FMA 3 2002-07-27 "" "Linux Programmer's Manual"
.SH NAME
fma, fmaf, fmal \- floating-point multiply and add
.SH SYNOPSIS
.nf
.B #include <math.h>
.sp
.BI "double fma(double " x ", double " y ", double " z );
.br
.BI "float fmaf(float " x ", float " y ", float " z );
.br
.BI "long double fmal(long double " x ", long double " y ", long double " z );
.fi
.sp
Compile with \fI\-std=c99\fP; link with \fI\-lm\fP.
.SH DESCRIPTION
The
.BR fma ()
function computes
.IR x " * " y " + " z .
The result is rounded according to the
rounding mode determined by the value of
.BR FLT_ROUNDS .
.B FLT_ROUNDS
indicates the implementation-defined rounding
behavior for floating-point addition,
and has one of the following values:
.IP \-1
The rounding mode is not determinable.
.IP 0
Rounding is towards 0.
.IP 1
Rounding is towards nearest number.
.IP 2
Rounding is towards positive infinity.
.IP 3
Rounding is towards negative infinity.
.PP
Other values represent machine-dependent, non-standard rounding modes.
.SH "CONFORMING TO"
C99.
.SH "SEE ALSO"
.BR fenv (3),
.BR remainder (3),
.BR remquo (3)
.SH COLOPHON
This page is part of release 3.05 of the Linux
.I man-pages
project.
A description of the project,
and information about reporting bugs,
can be found at
http://www.kernel.org/doc/man-pages/.
|