summaryrefslogtreecommitdiffstats
path: root/lib/libm/man
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-07-24 19:25:50 +0000
committermartynas <martynas@openbsd.org>2011-07-24 19:25:50 +0000
commit8188d52eae6d994bce58b83f93729183a33f412e (patch)
tree2878ce6af9e1650eb8fd1d2d5476250f575a73f4 /lib/libm/man
parentcheck that a macro works in the head of a tagged paragraph; (diff)
downloadwireguard-openbsd-8188d52eae6d994bce58b83f93729183a33f412e.tar.xz
wireguard-openbsd-8188d52eae6d994bce58b83f93729183a33f412e.zip
Document fma, fmaf, fmal, nexttoward, nexttowardf, nexttowardl.
Diffstat (limited to 'lib/libm/man')
-rw-r--r--lib/libm/man/fma.358
-rw-r--r--lib/libm/man/nextafter.330
2 files changed, 73 insertions, 15 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 .
diff --git a/lib/libm/man/nextafter.3 b/lib/libm/man/nextafter.3
index d297269fc50..5efaf720adc 100644
--- a/lib/libm/man/nextafter.3
+++ b/lib/libm/man/nextafter.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: nextafter.3,v 1.5 2011/07/07 01:34:52 martynas Exp $
+.\" $OpenBSD: nextafter.3,v 1.6 2011/07/24 19:25:50 martynas Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,13 +28,16 @@
.\"
.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: July 7 2011 $
+.Dd $Mdocdate: July 24 2011 $
.Dt NEXTAFTER 3
.Os
.Sh NAME
.Nm nextafter ,
.Nm nextafterf ,
-.Nm nextafterl
+.Nm nextafterl ,
+.Nm nexttoward ,
+.Nm nexttowardf ,
+.Nm nexttowardl ,
.Nd next representable value
.Sh SYNOPSIS
.Fd #include <math.h>
@@ -44,9 +47,15 @@
.Fn nextafterf "float x" "float y"
.Ft long double
.Fn nextafterl "long double x" "long double y"
+.Ft double
+.Fn nexttoward "double x" "long double y"
+.Ft float
+.Fn nexttowardf "float x" "long double y"
+.Ft long double
+.Fn nexttowardl "long double x" "long double y"
.Sh DESCRIPTION
-.Fn nextafter
-returns the next machine representable number from
+These functions
+return the next machine representable number from
.Fa x
in direction
.Fa y .
@@ -54,17 +63,8 @@ If
.Fa x
equals
.Fa y ,
-.Fn nextafter
-returns
+these functions return
.Fa y .
-The
-.Fn nextafterf
-function is a single precision version of
-.Fn nextafter .
-The
-.Fn nextafterl
-function is an extended precision version of
-.Fn nextafter .
.Sh SEE ALSO
.Xr nearbyint 3
.Sh STANDARDS