xref: /dragonfly/contrib/openbsd_libm/man/fma.3 (revision 6e5c5008)
1.\"	$OpenBSD: fma.3,v 1.3 2013/06/05 03:40:26 tedu Exp $
2.\"
3.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: June 5 2013 $
18.Dt FMA 3
19.Os
20.Sh NAME
21.Nm fma ,
22.Nm fmaf ,
23.Nm fmal
24.Nd floating multiply-add
25.Sh SYNOPSIS
26.In math.h
27.Ft double
28.Fn fma "double x" "double y" "double z"
29.Ft float
30.Fn fmaf "float x" "float y" "float z"
31.Ft long double
32.Fn fmal "long double x" "long double y" "long double z"
33.Sh DESCRIPTION
34The
35.Fn fma ,
36.Fn fmaf
37and
38.Fn fmal
39functions compute (x * y) + z, rounded as one ternary operation.
40The result is rounded according to the current rounding mode.
41.Sh RETURN VALUES
42The
43.Fn fma ,
44.Fn fmaf
45and
46.Fn fmal
47functions return (x * y) + z, rounded as one ternary operation.
48.Sh SEE ALSO
49.Xr fegetround 3 ,
50.Xr remainder 3
51.Sh STANDARDS
52The
53.Fn fma ,
54.Fn fmaf
55and
56.Fn fmal
57functions conform to
58.St -isoC-99 .
59