summaryrefslogtreecommitdiff
path: root/lib/libm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm')
-rw-r--r--lib/libm/man/acos.36
-rw-r--r--lib/libm/man/acosh.36
-rw-r--r--lib/libm/man/asin.38
-rw-r--r--lib/libm/man/atan.36
-rw-r--r--lib/libm/man/atan2.36
-rw-r--r--lib/libm/man/atanh.39
-rw-r--r--lib/libm/man/cosh.36
-rw-r--r--lib/libm/man/cproj.36
-rw-r--r--lib/libm/man/erf.38
-rw-r--r--lib/libm/man/exp.327
-rw-r--r--lib/libm/man/fdim.36
-rw-r--r--lib/libm/man/feclearexcept.36
-rw-r--r--lib/libm/man/fmax.38
-rw-r--r--lib/libm/man/hypot.334
-rw-r--r--lib/libm/man/ilogb.36
-rw-r--r--lib/libm/man/j0.36
-rw-r--r--lib/libm/man/lgamma.38
-rw-r--r--lib/libm/man/logb.317
-rw-r--r--lib/libm/man/nan.318
-rw-r--r--lib/libm/man/remainder.328
-rw-r--r--lib/libm/man/scalbn.36
21 files changed, 103 insertions, 128 deletions
diff --git a/lib/libm/man/acos.3 b/lib/libm/man/acos.3
index 3a91e63749e..b99783f1f6f 100644
--- a/lib/libm/man/acos.3
+++ b/lib/libm/man/acos.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: acos.3,v 1.14 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: acos.3,v 1.15 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)acos.3 5.1 (Berkeley) 5/2/91
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ACOS 3
.Os
.Sh NAME
@@ -50,7 +50,7 @@ The
function computes the principal value of the arc cosine of
.Fa x
in the range
-.Bq 0 , \*(Pi .
+.Bq 0 , pi .
The
.Fn acosf
is a single precision version of
diff --git a/lib/libm/man/acosh.3 b/lib/libm/man/acosh.3
index 2783c720101..884946167a5 100644
--- a/lib/libm/man/acosh.3
+++ b/lib/libm/man/acosh.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: acosh.3,v 1.16 2016/03/10 11:45:37 jmc Exp $
+.\" $OpenBSD: acosh.3,v 1.17 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)acosh.3 5.2 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: March 10 2016 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ACOSH 3
.Os
.Sh NAME
@@ -65,7 +65,7 @@ If x is less than one,
.Fn acoshf "x"
and
.Fn acoshl "x"
-return \*(Na and set the global variable
+return NaN and set the global variable
.Va errno
to EDOM.
.Sh SEE ALSO
diff --git a/lib/libm/man/asin.3 b/lib/libm/man/asin.3
index 8d1a2f7cff5..7a2bb20ecb8 100644
--- a/lib/libm/man/asin.3
+++ b/lib/libm/man/asin.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: asin.3,v 1.15 2013/11/03 18:28:27 martynas Exp $
+.\" $OpenBSD: asin.3,v 1.16 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)asin.3 5.1 (Berkeley) 5/2/91
.\"
-.Dd $Mdocdate: November 3 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ASIN 3
.Os
.Sh NAME
@@ -51,7 +51,7 @@ function computes the principal value of the arc sine of
.Fa x
in the range
.Bk -words
-.Bq -\*(Pi/2, +\*(Pi/2 .
+.Bq -pi/2, +pi/2 .
.Ek
The
.Fn asinf
@@ -67,7 +67,7 @@ If |x|>1,
.Fn asinf "x"
and
.Fn asinl "x"
-return \*(Na and set the global variable
+return NaN and set the global variable
.Va errno
to EDOM.
.Sh SEE ALSO
diff --git a/lib/libm/man/atan.3 b/lib/libm/man/atan.3
index 0baa1f96a0a..26d44dcfcec 100644
--- a/lib/libm/man/atan.3
+++ b/lib/libm/man/atan.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: atan.3,v 1.13 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: atan.3,v 1.14 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)atan.3 5.1 (Berkeley) 5/2/91
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ATAN 3
.Os
.Sh NAME
@@ -51,7 +51,7 @@ function computes the principal value of the arc tangent of
.Fa x
in the range
.Bk -words
-.Bq -\*(Pi/2 , +\*(Pi/2 .
+.Bq -pi/2 , +pi/2 .
.Ek
The
.Fn atanf
diff --git a/lib/libm/man/atan2.3 b/lib/libm/man/atan2.3
index b94bc3b2082..263b3f646c5 100644
--- a/lib/libm/man/atan2.3
+++ b/lib/libm/man/atan2.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: atan2.3,v 1.18 2016/03/10 22:29:38 tb Exp $
+.\" $OpenBSD: atan2.3,v 1.19 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91
.\"
-.Dd $Mdocdate: March 10 2016 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ATAN2 3
.Os
.Sh NAME
@@ -70,7 +70,7 @@ return the arc tangent of
.Ar y/ Ns Ar x
in the range
.Bk -words
-.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi
+.Bq \&- Ns pi , \&+ Ns pi
.Ek
radians.
If both
diff --git a/lib/libm/man/atanh.3 b/lib/libm/man/atanh.3
index 5e9ef2eb42f..769f2add43f 100644
--- a/lib/libm/man/atanh.3
+++ b/lib/libm/man/atanh.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: atanh.3,v 1.16 2016/03/10 11:45:37 jmc Exp $
+.\" $OpenBSD: atanh.3,v 1.17 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)atanh.3 5.2 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: March 10 2016 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ATANH 3
.Os
.Sh NAME
@@ -65,13 +65,14 @@ If |x|>=1,
.Fn atanhf "x"
and
.Fn atanhl "x"
-return +\*(If, -\*(If or \*(Na, and set the global variable
+return +infinity, -infinity or NaN, and set the global variable
.Va errno
to EDOM.
.Sh SEE ALSO
.Xr acosh 3 ,
.Xr asinh 3 ,
-.Xr exp 3
+.Xr exp 3 ,
+.Xr fpclassify 3 ,
.Sh HISTORY
The
.Fn atanh
diff --git a/lib/libm/man/cosh.3 b/lib/libm/man/cosh.3
index 907f5b341fd..67475a03be1 100644
--- a/lib/libm/man/cosh.3
+++ b/lib/libm/man/cosh.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cosh.3,v 1.15 2013/11/03 18:28:27 martynas Exp $
+.\" $OpenBSD: cosh.3,v 1.16 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)cosh.3 5.1 (Berkeley) 5/2/91
.\"
-.Dd $Mdocdate: November 3 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt COSH 3
.Os
.Sh NAME
@@ -63,7 +63,7 @@ If the magnitude of x is too large,
.Fn coshf "x"
and
.Fn coshl "x"
-return \*(If and set the global variable
+return infinity and set the global variable
.Va errno
to ERANGE.
.Sh SEE ALSO
diff --git a/lib/libm/man/cproj.3 b/lib/libm/man/cproj.3
index a61744d1b78..879d2872a90 100644
--- a/lib/libm/man/cproj.3
+++ b/lib/libm/man/cproj.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cproj.3,v 1.4 2013/11/03 18:28:27 martynas Exp $
+.\" $OpenBSD: cproj.3,v 1.5 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 3 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt CPROJ 3
.Os
.Sh NAME
@@ -50,7 +50,7 @@ functions return
for all finite complex numbers.
If
.Fa z
-has an infinite part (even if the other part is \*(Na),
+has an infinite part (even if the other part is NaN),
they return the equivalent of:
.Bd -literal -offset indent
INFINITY + I * copysign(0.0, cimag(z))
diff --git a/lib/libm/man/erf.3 b/lib/libm/man/erf.3
index 952bd799304..bb1cba2070a 100644
--- a/lib/libm/man/erf.3
+++ b/lib/libm/man/erf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: erf.3,v 1.14 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: erf.3,v 1.15 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)erf.3 6.4 (Berkeley) 4/20/91
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ERFC 3
.Os
.Sh NAME
@@ -69,10 +69,10 @@ functions are single and double precision versions of
The error function is defined as:
.Bd -filled -offset indent
.if n \{\
-erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \}
+erf(x) = 2/sqrt(pi)*\|integral from 0 to x of exp(\-t*t) dt. \}
.if t \{\
erf\|(x) :=
-(2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \}
+(2/\(sr pi)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \}
.Ed
.Pp
The
diff --git a/lib/libm/man/exp.3 b/lib/libm/man/exp.3
index 88679e8b39f..ae416b71e40 100644
--- a/lib/libm/man/exp.3
+++ b/lib/libm/man/exp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: exp.3,v 1.32 2016/03/12 18:15:20 tb Exp $
+.\" $OpenBSD: exp.3,v 1.33 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91
.\"
-.Dd $Mdocdate: March 12 2016 $
+.Dd $Mdocdate: April 26 2016 $
.Dt EXP 3
.Os
.Sh NAME
@@ -282,16 +282,12 @@ expm1 and logp1 in BASIC on the Hewlett\-Packard HP-71B
and APPLE Macintosh, EXP1 and LN1 in Pascal, exp1 and log1 in C
on APPLE Macintoshes, where they have been provided to make
sure financial calculations of ((1+x)**n\-1)/x, namely
-expm1(n\(**log1p(x))/x, will be accurate when x is tiny.
+expm1(n*log1p(x))/x, will be accurate when x is tiny.
They also provide accurate inverse hyperbolic functions.
.Pp
The function
.Fn pow x 0
-returns x**0 = 1 for all x including x = 0 and
-.if n \
-\*(If.
-.if t \
-\(if.
+returns x**0 = 1 for all x including x = 0 and infinity.
Previous implementations of
.Fn pow
may have defined x**0 to be undefined in some or all of these cases.
@@ -299,7 +295,7 @@ Here are reasons for returning x**0 = 1 always:
.Bl -enum -width indent
.It
Any program that already tests whether x is zero (or
-infinite or \*(Na) before computing x**0 cannot care
+infinite or NaN) before computing x**0 cannot care
whether 0**0 = 1 or not.
Any program that depends upon 0**0 to be invalid is dubious anyway since that
expression's meaning and, if invalid, its consequences
@@ -310,10 +306,10 @@ all x, including x = 0.
This is compatible with the convention that accepts a[0]
as the value of polynomial
.Bd -literal -offset indent
-p(x) = a[0]\(**x**0 + a[1]\(**x**1 + a[2]\(**x**2 +...+ a[n]\(**x**n
+p(x) = a[0]*x**0 + a[1]*x**1 + a[2]*x**2 +...+ a[n]*x**n
.Ed
.Pp
-at x = 0 rather than reject a[0]\(**0**0 as invalid.
+at x = 0 rather than reject a[0]*0**0 as invalid.
.It
Analysts will accept 0**0 = 1 despite that x**y can
approach anything or nothing as x and y approach 0
@@ -327,15 +323,12 @@ in power series) in z around z = 0, and if there
x(0) = y(0) = 0, then x(z)**y(z) \(-> 1 as z \(-> 0.
.Ed
.It
-If 0**0 = 1, then
-.if n \
-\*(If**0 = 1/0**0 = 1 too; and
-.if t \
-\(if**0 = 1/0**0 = 1 too; and
-then \*(Na**0 = 1 too because x**0 = 1 for all finite
+If 0**0 = 1, then infinity**0 = 1/0**0 = 1 too; and
+then NaN**0 = 1 too because x**0 = 1 for all finite
and infinite x, i.e., independently of x.
.El
.Sh SEE ALSO
+.Xr fpclassify 3 ,
.Xr ilogb 3
.Sh HISTORY
The
diff --git a/lib/libm/man/fdim.3 b/lib/libm/man/fdim.3
index 7cb2259a689..7c4089c4786 100644
--- a/lib/libm/man/fdim.3
+++ b/lib/libm/man/fdim.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fdim.3,v 1.2 2011/07/07 01:34:52 martynas Exp $
+.\" $OpenBSD: fdim.3,v 1.3 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 2004 David Schultz <das@FreeBSD.org>
.\" All rights reserved.
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD: src/lib/msun/man/fdim.3,v 1.1 2004/06/30 07:04:01 das Exp $
.\"
-.Dd $Mdocdate: July 7 2011 $
+.Dd $Mdocdate: April 26 2016 $
.Dt FDIM 3
.Os
.Sh NAME
@@ -61,7 +61,7 @@ If either
.Fa x
or
.Fa y
-is an \*(Na, then an \*(Na is returned.
+is an NaN, then an NaN is returned.
Otherwise, the result is
.Li +0.0 .
.Pp
diff --git a/lib/libm/man/feclearexcept.3 b/lib/libm/man/feclearexcept.3
index 792c72b93b7..2ec79accde8 100644
--- a/lib/libm/man/feclearexcept.3
+++ b/lib/libm/man/feclearexcept.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: feclearexcept.3,v 1.4 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: feclearexcept.3,v 1.5 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt FECLEAREXCEPT 3
.Os
.Sh NAME
@@ -55,7 +55,7 @@ perform calculations for which there is no reasonable representable
answer.
.Pp
For instance, subtraction of infinities, division of zero by zero,
-ordered comparison involving \*(Nas, and taking the square root of a
+ordered comparison involving NaNs, and taking the square root of a
negative number are all invalid operations.
.It Dv FE_OVERFLOW
An overflow exception occurs when the magnitude of the result of a
diff --git a/lib/libm/man/fmax.3 b/lib/libm/man/fmax.3
index 19c4413c284..af6fa3d38a6 100644
--- a/lib/libm/man/fmax.3
+++ b/lib/libm/man/fmax.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fmax.3,v 1.2 2011/07/07 01:34:52 martynas Exp $
+.\" $OpenBSD: fmax.3,v 1.3 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 2004 David Schultz <das@FreeBSD.org>
.\" All rights reserved.
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD: src/lib/msun/man/fmax.3,v 1.2 2005/01/14 09:12:05 ru Exp $
.\"
-.Dd $Mdocdate: July 7 2011 $
+.Dd $Mdocdate: April 26 2016 $
.Dt FMAX 3
.Os
.Sh NAME
@@ -74,8 +74,8 @@ They treat
.Li +0.0
as being larger than
.Li -0.0 .
-If one argument is an \*(Na, then the other argument is returned.
-If both arguments are \*(Nas, then the result is an \*(Na.
+If one argument is an NaN, then the other argument is returned.
+If both arguments are NaNs, then the result is an NaN.
These routines do not raise any floating-point exceptions.
.Sh SEE ALSO
.Xr fabs 3 ,
diff --git a/lib/libm/man/hypot.3 b/lib/libm/man/hypot.3
index b19c2eacfbd..325cdcd9086 100644
--- a/lib/libm/man/hypot.3
+++ b/lib/libm/man/hypot.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: hypot.3,v 1.22 2016/03/10 22:29:38 tb Exp $
+.\" $OpenBSD: hypot.3,v 1.23 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)hypot.3 6.7 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: March 10 2016 $
+.Dd $Mdocdate: April 26 2016 $
.Dt HYPOT 3
.Os
.Sh NAME
@@ -66,12 +66,10 @@ sqrt(x*x+y*y)
in such a way that underflow will not happen, and overflow
occurs only if the final result deserves it.
.Pp
-.Fn hypot "\*(If" "v"
-=
-.Fn hypot "v" "\*(If"
-= +\*(If for all
+.Fn hypot "infinity" "v" No = Fn hypot "v" "infinity" No = +infinity
+for all
.Ar v ,
-including \*(Na.
+including NaN.
.Pp
The
.Fn cabs ,
@@ -84,37 +82,35 @@ functions return the absolute value of the complex number
Below 0.97
.Em ulps .
Consequently
-.Fn hypot "5.0" "12.0"
-= 13.0
+.Fn hypot "5.0" "12.0" No = 13.0
exactly;
in general, hypot and cabs return an integer whenever an
integer might be expected.
.Sh NOTES
As might be expected,
-.Fn hypot "v" "\*(Na"
+.Fn hypot "v" "NaN"
and
-.Fn hypot "\*(Na" "v"
-are \*(Na for all
+.Fn hypot "NaN" "v"
+are NaN for all
.Em finite
.Ar v .
Programmers might be surprised at first to discover that
-.Fn hypot "\(+-\*(If" "\*(Na"
-= +\*(If.
+.Fn hypot "\(+-infinity" "NaN" No = +infinity.
This is intentional; it happens because
-.Fn hypot "\*(If" "v"
-= +\*(If
+.Fn hypot "infinity" "v" No = +infinity
for
.Em all
.Ar v ,
finite or infinite.
Hence
-.Fn hypot "\*(If" "v"
+.Fn hypot "infinity" "v"
is independent of
.Ar v .
-The IEEE \*(Na is designed to disappear
+The IEEE NaN is designed to disappear
when it turns out to be irrelevant, as it does in
-.Fn hypot "\*(If" "\*(Na" .
+.Fn hypot "infinity" "NaN" .
.Sh SEE ALSO
+.Xr fpclassify 3 ,
.Xr sqrt 3
.Sh HISTORY
A
diff --git a/lib/libm/man/ilogb.3 b/lib/libm/man/ilogb.3
index ed056ac5f10..e2e2a468555 100644
--- a/lib/libm/man/ilogb.3
+++ b/lib/libm/man/ilogb.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ilogb.3,v 1.6 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: ilogb.3,v 1.7 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt ILOGB 3
.Os
.Sh NAME
@@ -50,7 +50,7 @@ returns
.Fa x Ns 's exponent
.Fa n ,
in integer format.
-.Fn ilogb \*(Pm\*(If
+.Fn ilogb \(+-infinity
returns
.Dv INT_MAX
and
diff --git a/lib/libm/man/j0.3 b/lib/libm/man/j0.3
index 1e55333b16b..7ae9fb9d898 100644
--- a/lib/libm/man/j0.3
+++ b/lib/libm/man/j0.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: j0.3,v 1.15 2013/07/17 05:42:11 schwarze Exp $
+.\" $OpenBSD: j0.3,v 1.16 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)j0.3 6.7 (Berkeley) 4/19/91
.\"
-.Dd $Mdocdate: July 17 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt J0 3
.Os
.Sh NAME
@@ -152,6 +152,6 @@ The functions
.Fn y0 ,
.Fn y1 ,
and
-.Fn yn
+.Fn yn
first appeared in
.At v7 .
diff --git a/lib/libm/man/lgamma.3 b/lib/libm/man/lgamma.3
index fe799e18b6f..8aab5564140 100644
--- a/lib/libm/man/lgamma.3
+++ b/lib/libm/man/lgamma.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: lgamma.3,v 1.26 2016/03/10 22:29:38 tb Exp $
+.\" $OpenBSD: lgamma.3,v 1.27 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92
.\"
-.Dd $Mdocdate: March 10 2016 $
+.Dd $Mdocdate: April 26 2016 $
.Dt LGAMMA 3
.Os
.Sh NAME
@@ -114,11 +114,11 @@ functions return \(*G(x), with no effect on
.Va signgam .
.Sh IDIOSYNCRASIES
Do not use the expression
-.Sq Li signgam\(**exp(lgamma(x))
+.Sq Li signgam*exp(lgamma(x))
to compute g := \(*G(x).
Instead use a program like this (in C):
.Bd -literal -offset indent
-lg = lgamma(x); g = signgam\(**exp(lg);
+lg = lgamma(x); g = signgam*exp(lg);
.Ed
.Pp
Only after
diff --git a/lib/libm/man/logb.3 b/lib/libm/man/logb.3
index 30978d10be3..9c215a5aa2d 100644
--- a/lib/libm/man/logb.3
+++ b/lib/libm/man/logb.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: logb.3,v 1.9 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: logb.3,v 1.10 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt LOGB 3
.Os
.Sh NAME
@@ -69,10 +69,10 @@ returns
.Fa x Ns 's exponent
.Fa n ,
a signed integer converted to double\-precision floating\-point.
-.Fn logb \*(Pm\*(If
-= +\*(If;
+.Fn logb \(+-infinity
+= +infinity;
.Fn logb 0
-= -\*(If with a division by zero exception.
+= -infinity with a division by zero exception.
.Fn logbf
is the single precision form of
.Fn logb .
@@ -82,7 +82,7 @@ is the extended precision form of
.Pp
.Fn scalb x n
returns
-.Fa x Ns \(**(2** Ns Fa n )
+.Fa x Ns *(2** Ns Fa n )
computed by exponent manipulation.
.Fn scalbf
is the single precision form of
@@ -97,18 +97,19 @@ returns
where
.Fa x
:=
-.Fa sig No \(** 2** Ns Fa n
+.Fa sig No * 2** Ns Fa n
with 1 \(<=
.Fa sig
< 2.
.Fn significand x
is not defined when
.Fa x
-is 0, \*(Pm\*(If, or \*(Na.
+is 0, \(+-infinity, or NaN.
.Fn significandf
is the single precision for of
.Fn significand .
.Sh SEE ALSO
+.Xr fpclassify 3 ,
.Xr ilogb 3 ,
.Xr scalbn 3
.Sh STANDARDS
diff --git a/lib/libm/man/nan.3 b/lib/libm/man/nan.3
index f247ff3026d..b70269c161e 100644
--- a/lib/libm/man/nan.3
+++ b/lib/libm/man/nan.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: nan.3,v 1.5 2011/07/07 01:34:52 martynas Exp $
+.\" $OpenBSD: nan.3,v 1.6 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 2007 David Schultz <das@FreeBSD.org>
.\" All rights reserved.
@@ -26,14 +26,14 @@
.\"
.\" $FreeBSD: src/lib/msun/man/nan.3,v 1.1 2007/12/16 21:19:28 das Exp $
.\"
-.Dd $Mdocdate: July 7 2011 $
+.Dd $Mdocdate: April 26 2016 $
.Dt NAN 3
.Os
.Sh NAME
.Nm nan ,
.Nm nanf ,
.Nm nanl
-.Nd quiet \*(Nas
+.Nd quiet NaNs
.Sh SYNOPSIS
.In math.h
.Ft double
@@ -45,20 +45,20 @@
.Sh DESCRIPTION
The
.Dv NAN
-macro expands to a quiet \*(Na (Not A Number).
+macro expands to a quiet NaN (Not A Number).
Similarly both the
.Fn nan ,
.Fn nanf
and
.Fn nanl
-functions generate a quiet \*(Na value without raising an invalid exception.
+functions generate a quiet NaN value without raising an invalid exception.
The argument
.Fa s
should point to either an empty string or a hexadecimal representation
of a non-negative integer (e.g. 0x1234).
In the latter case, the integer is encoded in some free bits in the
-representation of the \*(Na, which sometimes stores
-machine-specific information about why a particular \*(Na was generated.
+representation of the NaN, which sometimes stores
+machine-specific information about why a particular NaN was generated.
There are 22 such bits available for
.Vt float
variables, 51 bits for
@@ -68,12 +68,12 @@ variables, and at least 51 bits for a
If
.Fa s
is improperly formatted or represents an integer that is too large,
-then the particular encoding of the quiet \*(Na that is returned
+then the particular encoding of the quiet NaN that is returned
is indeterminate.
.Sh COMPATIBILITY
Calling these functions with a non-empty string isn't portable.
Another operating system may translate the string into a different
-\*(Na encoding, and furthermore, the meaning of a given \*(Na encoding
+NaN encoding, and furthermore, the meaning of a given NaN encoding
varies across machine architectures.
If you understood the innards of a particular platform well enough to
know what string to use, then you would have no need for these functions
diff --git a/lib/libm/man/remainder.3 b/lib/libm/man/remainder.3
index 5476dfa2360..5206df516ce 100644
--- a/lib/libm/man/remainder.3
+++ b/lib/libm/man/remainder.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: remainder.3,v 1.7 2015/11/10 23:48:18 jmc Exp $
+.\" $OpenBSD: remainder.3,v 1.8 2016/04/26 19:49:22 tb Exp $
.\"
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
@@ -30,7 +30,7 @@
.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
.\" $FreeBSD: src/lib/msun/man/remainder.3,v 1.6 2008/03/30 20:48:02 das Exp $
.\"
-.Dd $Mdocdate: November 10 2015 $
+.Dd $Mdocdate: April 26 2016 $
.Dt REMAINDER 3
.Os
.Sh NAME
@@ -66,11 +66,7 @@
and
.Fn remquol
return the remainder
-.Fa r
-:=
-.Fa x
-\-
-.Fa n\(**y
+.Fa r No := Fa x No \(mi Fa n Ns * Ns Fa y
where
.Fa n
is the integer nearest the exact value of
@@ -78,30 +74,18 @@ is the integer nearest the exact value of
.Fa x Ns / Ns Fa y ;
.Ek
moreover if
-.Pf \*(Ba Fa n
-\-
-.Sm off
-.Fa x No / Fa y No \*(Ba
-.Sm on
-=
-1/2
+.Eo | Fa n No \(mi Fa x Ns / Ns Fa y Ec | = 1/2
then
.Fa n
is even.
Consequently
the remainder is computed exactly and
-.Sm off
-.Pf \*(Ba Fa r No \*(Ba
-.Sm on
-\*(Le
-.Sm off
-.Pf \*(Ba Fa y No \*(Ba/2 .
-.Sm on
+.Eo | Fa r Ec | \(<= Eo | Fa y Ec | Ns /2 .
But attempting to take the remainder when
.Fa y
is 0 or
.Fa x
-is \*(Pm\*(If is an invalid operation that produces a \*(Na.
+is \(+-infinity is an invalid operation that produces a NaN.
.Pp
The
.Fn remquo ,
diff --git a/lib/libm/man/scalbn.3 b/lib/libm/man/scalbn.3
index 875bb984bfd..ce5de0b5a05 100644
--- a/lib/libm/man/scalbn.3
+++ b/lib/libm/man/scalbn.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: scalbn.3,v 1.4 2013/06/05 03:40:26 tedu Exp $
+.\" $OpenBSD: scalbn.3,v 1.5 2016/04/26 19:49:22 tb Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,7 +28,7 @@
.\"
.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 26 2016 $
.Dt SCALBN 3
.Os
.Sh NAME
@@ -58,7 +58,7 @@
and
.Fn scalbn
return
-.Fa x Ns \(**(2** Ns Fa n )
+.Fa x Ns *(2** Ns Fa n )
computed by exponent manipulation.
The
.Fn scalblnf