Subject: lib/3405: Typos and errors in libm man pages
To: None <gnats-bugs@gnats.netbsd.org>
From: Krister Walfridsson <cato@ulysses.df.lth.se>
List: netbsd-bugs
Date: 03/29/1997 04:56:05
>Number: 3405
>Category: lib
>Synopsis: Typos and errors in libm man pages
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 28 20:05:01 1997
>Last-Modified:
>Originator: Krister Walfridsson
>Organization:
>Release: NetBSD-current Mar 28 1997
>Environment:
System: NetBSD ulysses.df.lth.se 1.2D NetBSD 1.2D (KWA) #3: Thu Mar 27 04:01:06 MET 1997 cato@ulysses.df.lth.se:/usr/src/sys/arch/sparc/compile/KWA sparc
>Description:
The man pages for libm has some typos and are not up to date.
The following diffs corrects some typos and deletes all references
to matherr(3) since we are using errno by default.
>How-To-Repeat:
>Fix:
diff -u man/acos.3.orig man/acos.3
--- man/acos.3.orig Sat Mar 29 02:06:25 1997
+++ man/acos.3 Sat Mar 29 02:23:23 1997
@@ -54,8 +54,13 @@
in the range
.Bq 0 , \*(Pi .
.Sh RETURN VALUES
-Exceptional cases are handled by
-.Xr matherr 3 .
+If |x|>1,
+.Fn acos "x"
+and
+.Fn acosf "x"
+sets the global variable
+.Va errno
+to EDOM.
.Sh SEE ALSO
.Xr sin 3 ,
.Xr cos 3 ,
@@ -66,5 +71,4 @@
.Xr sinh 3 ,
.Xr cosh 3 ,
.Xr tanh 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
diff -u man/acosh.3.orig man/acosh.3
--- man/acosh.3.orig Sat Mar 29 02:34:00 1997
+++ man/acosh.3 Sat Mar 29 03:32:18 1997
@@ -34,7 +34,7 @@
.\"
.Dd May 6, 1991
.Dt ACOSH 3
-.Os BSD 4.3
+.Os
.Sh NAME
.Nm acosh
.Nd inverse hyperbolic cosine function
@@ -54,14 +54,18 @@
argument
.Ar x .
.Sh RETURN VALUES
-Exceptional cases are handled by
-.Xr matherr 3 .
+If x is less than one,
+.Fn acosh "x"
+and
+.Fn acoshf "x"
+returns NaN and sets the global variable
+.Va errno
+to EDOM.
.Sh SEE ALSO
.Xr asinh 3 ,
.Xr atanh 3 ,
.Xr exp 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
.Sh HISTORY
The
.Fn acosh
diff -u man/asin.3.orig man/asin.3
--- man/asin.3.orig Sat Mar 29 02:34:14 1997
+++ man/asin.3 Sat Mar 29 03:41:58 1997
@@ -56,8 +56,13 @@
.Bq -\*(Pi/2, +\*(Pi/2 .
.Ek
.Sh RETURN VALUES
-Exceptional cases are handled by
-.Xr matherr 3 .
+If |x|>1,
+.Fn asin "x"
+and
+.Fn asinf "x"
+returns NaN and sets the global variable
+.Va errno
+to EDOM.
.Sh SEE ALSO
.Xr acos 3 ,
.Xr atan 3 ,
@@ -68,5 +73,4 @@
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
diff -u man/asinh.3.orig man/asinh.3
--- man/asinh.3.orig Sat Mar 29 02:34:26 1997
+++ man/asinh.3 Sat Mar 29 03:39:53 1997
@@ -34,7 +34,7 @@
.\"
.Dd May 6, 1991
.Dt ASINH 3
-.Os BSD 4.3
+.Os
.Sh NAME
.Nm asinh
.Nd inverse hyperbolic sine function
@@ -59,15 +59,11 @@
.Fn asinhf
functions return the inverse hyperbolic sine of
.Ar x .
-.Sh RETURN VALUES
-Exceptional cases are handled by
-.Xr matherr 3 .
.Sh SEE ALSO
.Xr acosh 3 ,
.Xr atanh 3 ,
.Xr exp 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
.Sh HISTORY
The
.Fn asinh
diff -u man/atan.3.orig man/atan.3
--- man/atan.3.orig Sat Mar 29 02:34:43 1997
+++ man/atan.3 Sat Mar 29 03:50:41 1997
@@ -55,9 +55,6 @@
.Bk -words
.Bq -\*(Pi/2 , +\*(Pi/2 .
.Ek
-.Sh RETURN VALUES
-Exceptional cases are handled by
-.Xr matherr 3 .
.Sh SEE ALSO
.Xr acos 3 ,
.Xr asin 3 ,
@@ -68,5 +65,4 @@
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
diff -u man/atanh.3.orig man/atanh.3
--- man/atanh.3.orig Sat Mar 29 02:34:52 1997
+++ man/atanh.3 Sat Mar 29 03:55:40 1997
@@ -34,7 +34,7 @@
.\"
.Dd May 6, 1991
.Dt ATANH 3
-.Os BSD 4.3
+.Os
.Sh NAME
.Nm atanh
.Nd inverse hyperbolic tangent function
@@ -54,14 +54,18 @@
argument
.Ar x .
.Sh RETURN VALUES
-Exceptional conditions are handled by
-.Xr matherr 3 .
+If |x|>=1,
+.Fn atanh "x"
+and
+.Fn atanhf "x"
+returns +inf, -inf or NaN, and sets the global variable
+.Va errno
+to EDOM.
.Sh SEE ALSO
.Xr acosh 3 ,
.Xr asinh 3 ,
.Xr exp 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
.Sh HISTORY
The
.Fn atanh
diff -u man/cosh.3.orig man/cosh.3
--- man/cosh.3.orig Sat Mar 29 02:37:35 1997
+++ man/cosh.3 Sat Mar 29 04:01:32 1997
@@ -52,8 +52,13 @@
functions compute the hyperbolic cosine of
.Fa x .
.Sh RETURN VALUES
-Exceptional conditions are handled by
-.Xr matherr 3 .
+If the magnitude of x is too large,
+.Fn cosh "x"
+and
+.Fn coshf "x"
+returns Inf and sets the global variable
+.Va errno
+to ERANGE.
.Sh SEE ALSO
.Xr acos 3 ,
.Xr asin 3 ,
@@ -64,5 +69,4 @@
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3 ,
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
diff -u man/erf.3.orig man/erf.3
--- man/erf.3.orig Sat Mar 29 02:41:56 1997
+++ man/erf.3 Sat Mar 29 04:17:47 1997
@@ -33,8 +33,8 @@
.\" $Id: erf.3,v 1.4 1995/04/14 18:40:06 jtc Exp $
.\"
.Dd April 20, 1991
-.Dt ERF 3
-.Os BSD 4.3
+.Dt
+.Os
.Sh NAME
.Nm erf ,
.Nm erfc
@@ -43,7 +43,7 @@
.Fd #include <math.h>
.Ft double
.Fn erf "double x"
-.Fn float
+.Ft float
.Fn erff "float x"
.Ft double
.Fn erfc "double x"
diff -u man/exp.3.orig man/exp.3
--- man/exp.3.orig Sat Mar 29 02:43:18 1997
+++ man/exp.3 Sat Mar 29 02:44:52 1997
@@ -34,7 +34,7 @@
.\"
.Dd July 31, 1991
.Dt EXP 3
-.Os BSD 4
+.Os
.Sh NAME
.Nm exp ,
.Nm expm1 ,
@@ -68,7 +68,7 @@
.Ft double
.Fn pow "double x" "double y"
.Ft float
-.Fn powf "float x" float y"
+.Fn powf "float x" "float y"
.Sh DESCRIPTION
The
.Fn exp
diff -u man/hypot.3.orig man/hypot.3
--- man/hypot.3.orig Sat Mar 29 02:45:26 1997
+++ man/hypot.3 Sat Mar 29 02:45:42 1997
@@ -34,7 +34,7 @@
.\"
.Dd May 6, 1991
.Dt HYPOT 3
-.Os BSD 4
+.Os
.Sh NAME
.Nm hypot ,
.Nm cabs
diff -u man/ieee_test.3.orig man/ieee_test.3
--- man/ieee_test.3.orig Sat Mar 29 02:45:58 1997
+++ man/ieee_test.3 Sat Mar 29 02:46:19 1997
@@ -53,7 +53,7 @@
.Ft double
.Fn significand "double x"
.Ft float
-.Fn significand "float x"
+.Fn significandf "float x"
.Sh DESCRIPTION
These functions allow users to test conformance to
.St -ieee754 .
diff -u man/j0.3.orig man/j0.3
--- man/j0.3.orig Sat Mar 29 02:46:35 1997
+++ man/j0.3 Sat Mar 29 04:04:24 1997
@@ -34,7 +34,7 @@
.\"
.Dd April 19, 1991
.Dt J0 3
-.Os BSD 4
+.Os
.Sh NAME
.Nm j0 ,
.Nm j1 ,
@@ -125,23 +125,11 @@
(expressed as a double).
.Sh RETURN VALUES
If these functions are successful,
-the computed value is returned. On the
-.Tn VAX
-and
-.Tn Tahoe
-architectures,
-a negative
-.Fa x
-value
-results in an error; the global
-variable
+the computed value is returned, otherwise the the global variable
.Va errno
-is set to
-.Er EDOM
-and a reserve operand fault is generated.
+is set to EDOM or ERANGE.
.Sh SEE ALSO
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
.Sh HISTORY
This set of functions
appeared in
diff -u man/sqrt.3.orig man/sqrt.3
--- man/sqrt.3.orig Sat Mar 29 02:55:20 1997
+++ man/sqrt.3 Sat Mar 29 03:11:16 1997
@@ -65,11 +65,15 @@
functions compute
the non-negative square root of x.
.Sh RETURN VALUES
-Exceptional conditions are handled by
-.Xr matherr 3 .
+If x is negative,
+.Fn sqrt "x"
+and
+.Fn sqrtf "x"
+sets the global variable
+.Va errno
+to EDOM.
.Sh SEE ALSO
-.Xr math 3 ,
-.Xr matherr 3
+.Xr math 3
.Sh HISTORY
The
.Fn cbrt
>Audit-Trail:
>Unformatted: