From af726e9c88e90f09e08aad3f33278c55152d3a9d Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 29 Mar 1997 23:10:55 +0000 Subject: [PATCH] PR/3405: Krister Walfridsson: Various typos; since we compile with POSIX libm, we should not xref matherr(3), and describe the errno settings. --- lib/libm/man/acos.3 | 19 ++++++++++++++----- lib/libm/man/acosh.3 | 21 +++++++++++++++------ lib/libm/man/asin.3 | 19 ++++++++++++++----- lib/libm/man/asinh.3 | 15 ++++++++------- lib/libm/man/atan.3 | 13 +++++++------ lib/libm/man/atanh.3 | 21 +++++++++++++++------ lib/libm/man/cosh.3 | 19 ++++++++++++++----- lib/libm/man/erf.3 | 6 +++--- lib/libm/man/exp.3 | 9 +++++---- lib/libm/man/hypot.3 | 4 ++-- lib/libm/man/j0.3 | 27 ++++++++++++++------------- lib/libm/man/sqrt.3 | 19 ++++++++++++++----- 12 files changed, 125 insertions(+), 67 deletions(-) diff --git a/lib/libm/man/acos.3 b/lib/libm/man/acos.3 index aa0512d44492..974602897155 100644 --- a/lib/libm/man/acos.3 +++ b/lib/libm/man/acos.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)acos.3 5.1 (Berkeley) 5/2/91 -.\" $Id: acos.3,v 1.6 1995/04/14 18:39:53 jtc Exp $ +.\" $Id: acos.3,v 1.7 1997/03/29 23:10:55 christos Exp $ .\" .Dd May 2, 1991 .Dt ACOS 3 @@ -54,8 +54,17 @@ functions compute the principal value of the arc cosine of 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" +.\" POSIX_MODE +set the global variable +.Va errno +to EDOM. +.\" SYSV_MODE +.\" call +.\" .Xr matherr 3 . .Sh SEE ALSO .Xr sin 3 , .Xr cos 3 , @@ -66,5 +75,5 @@ Exceptional cases are handled by .Xr sinh 3 , .Xr cosh 3 , .Xr tanh 3 , -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 diff --git a/lib/libm/man/acosh.3 b/lib/libm/man/acosh.3 index e7bf5b4cae58..5bd5825d87a1 100644 --- a/lib/libm/man/acosh.3 +++ b/lib/libm/man/acosh.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)acosh.3 5.2 (Berkeley) 5/6/91 -.\" $Id: acosh.3,v 1.7 1996/03/30 01:33:59 jtc Exp $ +.\" $Id: acosh.3,v 1.8 1997/03/29 23:10:56 christos Exp $ .\" .Dd May 6, 1991 .Dt ACOSH 3 -.Os BSD 4.3 +.Os .Sh NAME .Nm acosh .Nd inverse hyperbolic cosine function @@ -54,14 +54,23 @@ of the real argument .Ar x . .Sh RETURN VALUES -Exceptional cases are handled by -.Xr matherr 3 . +.\" POSIX_MODE +If x is less than one, +.Fn acosh "x" +and +.Fn acoshf "x" +return NaN and set the global variable +.Va errno +to EDOM. +.\" SVR4_MODE +.\" call +.\" .Xr matherr 3 . .Sh SEE ALSO .Xr asinh 3 , .Xr atanh 3 , .Xr exp 3 , -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 .Sh HISTORY The .Fn acosh diff --git a/lib/libm/man/asin.3 b/lib/libm/man/asin.3 index 76c0ab4ca423..4e6193d37d8a 100644 --- a/lib/libm/man/asin.3 +++ b/lib/libm/man/asin.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)asin.3 5.1 (Berkeley) 5/2/91 -.\" $Id: asin.3,v 1.6 1995/04/14 18:39:56 jtc Exp $ +.\" $Id: asin.3,v 1.7 1997/03/29 23:10:57 christos Exp $ .\" .Dd May 2, 1991 .Dt ASIN 3 @@ -56,8 +56,17 @@ in the range .Bq -\*(Pi/2, +\*(Pi/2 . .Ek .Sh RETURN VALUES -Exceptional cases are handled by -.Xr matherr 3 . +.\" POSIX_MODE +If |x|>1, +.Fn asin "x" +and +.Fn asinf "x" +return NaN and set the global variable +.Va errno +to EDOM. +.\" SYSV_MODE +.\" call +.\" .Xr matherr 3 . .Sh SEE ALSO .Xr acos 3 , .Xr atan 3 , @@ -68,5 +77,5 @@ Exceptional cases are handled by .Xr sinh 3 , .Xr tan 3 , .Xr tanh 3 , -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 diff --git a/lib/libm/man/asinh.3 b/lib/libm/man/asinh.3 index 866b27440fb1..4d7a1faf475c 100644 --- a/lib/libm/man/asinh.3 +++ b/lib/libm/man/asinh.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)asinh.3 6.4 (Berkeley) 5/6/91 -.\" $Id: asinh.3,v 1.7 1996/03/30 01:34:00 jtc Exp $ +.\" $Id: asinh.3,v 1.8 1997/03/29 23:10:58 christos Exp $ .\" .Dd May 6, 1991 .Dt ASINH 3 -.Os BSD 4.3 +.Os .Sh NAME .Nm asinh .Nd inverse hyperbolic sine function @@ -59,15 +59,16 @@ and .Fn asinhf functions return the inverse hyperbolic sine of .Ar x . -.Sh RETURN VALUES -Exceptional cases are handled by -.Xr matherr 3 . +.\" SYSV_MODE +.\" .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 +.\" .Xr matherr 3 .Sh HISTORY The .Fn asinh diff --git a/lib/libm/man/atan.3 b/lib/libm/man/atan.3 index b934e45bdcce..d5b95cbbcb59 100644 --- a/lib/libm/man/atan.3 +++ b/lib/libm/man/atan.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)atan.3 5.1 (Berkeley) 5/2/91 -.\" $Id: atan.3,v 1.6 1995/04/14 18:39:59 jtc Exp $ +.\" $Id: atan.3,v 1.7 1997/03/29 23:10:59 christos Exp $ .\" .Dd May 2, 1991 .Dt ATAN 3 @@ -55,9 +55,10 @@ in the range .Bk -words .Bq -\*(Pi/2 , +\*(Pi/2 . .Ek -.Sh RETURN VALUES -Exceptional cases are handled by -.Xr matherr 3 . +.\" SYSV_MODE +.\" .Sh RETURN VALUES +.\" Exceptional cases are handled by +.\" .Xr matherr 3 . .Sh SEE ALSO .Xr acos 3 , .Xr asin 3 , @@ -68,5 +69,5 @@ Exceptional cases are handled by .Xr sinh 3 , .Xr tan 3 , .Xr tanh 3 , -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 diff --git a/lib/libm/man/atanh.3 b/lib/libm/man/atanh.3 index 010a4af5dac7..e371dc708e65 100644 --- a/lib/libm/man/atanh.3 +++ b/lib/libm/man/atanh.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)atanh.3 5.2 (Berkeley) 5/6/91 -.\" $Id: atanh.3,v 1.7 1996/03/30 01:34:02 jtc Exp $ +.\" $Id: atanh.3,v 1.8 1997/03/29 23:10:59 christos Exp $ .\" .Dd May 6, 1991 .Dt ATANH 3 -.Os BSD 4.3 +.Os .Sh NAME .Nm atanh .Nd inverse hyperbolic tangent function @@ -54,14 +54,23 @@ of the real argument .Ar x . .Sh RETURN VALUES -Exceptional conditions are handled by -.Xr matherr 3 . +If |x|>=1, +.Fn atanh "x" +and +.Fn atanhf "x" +.\" POSIX_MODE +return +inf, -inf or NaN, and sets the global variable +.Va errno ++to EDOM. +.\" SYSV_MODE +.\" call +.\" .Xr matherr 3 . .Sh SEE ALSO .Xr acosh 3 , .Xr asinh 3 , .Xr exp 3 , -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 .Sh HISTORY The .Fn atanh diff --git a/lib/libm/man/cosh.3 b/lib/libm/man/cosh.3 index 51fa7cca152c..f803ff8ffb1d 100644 --- a/lib/libm/man/cosh.3 +++ b/lib/libm/man/cosh.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)cosh.3 5.1 (Berkeley) 5/2/91 -.\" $Id: cosh.3,v 1.6 1995/04/14 18:40:04 jtc Exp $ +.\" $Id: cosh.3,v 1.7 1997/03/29 23:11:00 christos Exp $ .\" .Dd May 2, 1991 .Dt COSH 3 @@ -52,8 +52,17 @@ and 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" +.\" POSIX_MODE +return Inf and sets the global variable +.Va errno +to ERANGE. +.\" SYSV_MODE +.\" call +.\" .Xr matherr 3 . .Sh SEE ALSO .Xr acos 3 , .Xr asin 3 , @@ -64,5 +73,5 @@ Exceptional conditions are handled by .Xr sinh 3 , .Xr tan 3 , .Xr tanh 3 , -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 diff --git a/lib/libm/man/erf.3 b/lib/libm/man/erf.3 index b934d3c767d8..6a3072de6fcd 100644 --- a/lib/libm/man/erf.3 +++ b/lib/libm/man/erf.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)erf.3 6.4 (Berkeley) 4/20/91 -.\" $Id: erf.3,v 1.4 1995/04/14 18:40:06 jtc Exp $ +.\" $Id: erf.3,v 1.5 1997/03/29 23:11:01 christos Exp $ .\" .Dd April 20, 1991 .Dt ERF 3 -.Os BSD 4.3 +.Os .Sh NAME .Nm erf , .Nm erfc @@ -43,7 +43,7 @@ .Fd #include .Ft double .Fn erf "double x" -.Fn float +.Ft float .Fn erff "float x" .Ft double .Fn erfc "double x" diff --git a/lib/libm/man/exp.3 b/lib/libm/man/exp.3 index e40609bbb964..4fb90606570e 100644 --- a/lib/libm/man/exp.3 +++ b/lib/libm/man/exp.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 -.\" $Id: exp.3,v 1.10 1996/03/30 01:34:03 jtc Exp $ +.\" $Id: exp.3,v 1.11 1997/03/29 23:11:02 christos Exp $ .\" .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 @@ -159,7 +159,8 @@ and .Fn pow detect if the computed value will overflow, set the global variable -.Va errno to +.Va errno +to .Er ERANGE and cause a reserved operand fault on a .Tn VAX diff --git a/lib/libm/man/hypot.3 b/lib/libm/man/hypot.3 index 6b562c69c145..273b17bf3807 100644 --- a/lib/libm/man/hypot.3 +++ b/lib/libm/man/hypot.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)hypot.3 6.7 (Berkeley) 5/6/91 -.\" $Id: hypot.3,v 1.4 1995/04/14 18:40:12 jtc Exp $ +.\" $Id: hypot.3,v 1.5 1997/03/29 23:11:03 christos Exp $ .\" .Dd May 6, 1991 .Dt HYPOT 3 -.Os BSD 4 +.Os .Sh NAME .Nm hypot , .Nm cabs diff --git a/lib/libm/man/j0.3 b/lib/libm/man/j0.3 index 37ecca0f56a9..a5e6b444acb0 100644 --- a/lib/libm/man/j0.3 +++ b/lib/libm/man/j0.3 @@ -30,11 +30,11 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)j0.3 6.7 (Berkeley) 4/19/91 -.\" $Id: j0.3,v 1.7 1996/03/30 01:34:04 jtc Exp $ +.\" $Id: j0.3,v 1.8 1997/03/29 23:11:04 christos Exp $ .\" .Dd April 19, 1991 .Dt J0 3 -.Os BSD 4 +.Os .Sh NAME .Nm j0 , .Nm j1 , @@ -125,23 +125,24 @@ value (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 +the computed value is returned, otherwise +the global variable .Va errno is set to .Er EDOM and a reserve operand fault is generated. +.\" On the +.\" .Tn VAX +.\" and +.\" .Tn Tahoe +.\" architectures, a negative +.\" .Fa x +.\" value +.\" results in an error. .Sh SEE ALSO -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 .Sh HISTORY This set of functions appeared in diff --git a/lib/libm/man/sqrt.3 b/lib/libm/man/sqrt.3 index 54ac55c768ec..ddc0f3f9180c 100644 --- a/lib/libm/man/sqrt.3 +++ b/lib/libm/man/sqrt.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sqrt.3 6.4 (Berkeley) 5/6/91 -.\" $Id: sqrt.3,v 1.4 1995/04/14 18:40:21 jtc Exp $ +.\" $Id: sqrt.3,v 1.5 1997/03/29 23:11:06 christos Exp $ .\" .Dd May 6, 1991 .Dt SQRT 3 @@ -65,11 +65,20 @@ and 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" +.\" POSIX_MODE +set the global variable +.Va errno +to EDOM. +.\" SYSV_MODE +.\" call +.\" .Xr matherr 3 . .Sh SEE ALSO -.Xr math 3 , -.Xr matherr 3 +.Xr math 3 +.\" .Xr matherr 3 .Sh HISTORY The .Fn cbrt