summaryrefslogtreecommitdiff
path: root/lib/libm/man/fma.3
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-07-24 19:25:51 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-07-24 19:25:51 +0000
commitd27d78d21666f845babd72431397e91ae77fe551 (patch)
tree2f7ae773aeb545b6649d2e84a0f20195bf2fb21d /lib/libm/man/fma.3
parent2e06f4f94a9818c6ad3dedf892e585fa8df211a7 (diff)
Document fma, fmaf, fmal, nexttoward, nexttowardf, nexttowardl.
Diffstat (limited to 'lib/libm/man/fma.3')
-rw-r--r--lib/libm/man/fma.358
1 files changed, 58 insertions, 0 deletions
diff --git a/lib/libm/man/fma.3 b/lib/libm/man/fma.3
new file mode 100644
index 00000000000..f8238d033a8
--- /dev/null
+++ b/lib/libm/man/fma.3
@@ -0,0 +1,58 @@
+.\" $OpenBSD: fma.3,v 1.1 2011/07/24 19:25:50 martynas Exp $
+.\"
+.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 24 2011 $
+.Dt FMA 3
+.Os
+.Sh NAME
+.Nm fma ,
+.Nm fmaf ,
+.Nm fmal
+.Nd floating multiply-add
+.Sh SYNOPSIS
+.Fd #include <math.h>
+.Ft double
+.Fn fma "double x" "double y" "double z"
+.Ft float
+.Fn fmaf "float x" "float y" "float z"
+.Ft long double
+.Fn fmal "long double x" "long double y" "long double z"
+.Sh DESCRIPTION
+The
+.Fn fma ,
+.Fn fmaf
+and
+.Fn fmal
+functions compute (x * y) + z, rounded as one ternary operation.
+The result is rounded according to the current rounding mode.
+.Sh RETURN VALUES
+The
+.Fn fma ,
+.Fn fmaf
+and
+.Fn fmal
+functions return (x * y) + z, rounded as one ternary operation.
+.Sh SEE ALSO
+.Xr remainder 3 ,
+.Xr fegetround 3
+.Sh STANDARDS
+The
+.Fn fma ,
+.Fn fmaf
+and
+.Fn fmal
+functions conform to
+.St -isoC-99 .