summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2005-01-14 23:28:28 +0000
committerdas <das@FreeBSD.org>2005-01-14 23:28:28 +0000
commitdf8ce09fbda51b1a29af2e321a4c4feb4543aefc (patch)
tree7aa790913ac8bac811e6dd89164c064b37167b07 /lib
parent2fe7b09cb198e42356fd30dbc005daff0809ff0c (diff)
downloadFreeBSD-src-df8ce09fbda51b1a29af2e321a4c4feb4543aefc.zip
FreeBSD-src-df8ce09fbda51b1a29af2e321a4c4feb4543aefc.tar.gz
Remove numerous references to VAX floating-point and the setting of
errno, replacing them with a discussion of IEEE exceptions where appropriate. Cross-reference fenv(3) whenever exceptions are mentioned.
Diffstat (limited to 'lib')
-rw-r--r--lib/msun/man/acos.315
-rw-r--r--lib/msun/man/acosh.316
-rw-r--r--lib/msun/man/asin.317
-rw-r--r--lib/msun/man/atan2.320
-rw-r--r--lib/msun/man/atanh.321
-rw-r--r--lib/msun/man/cosh.314
-rw-r--r--lib/msun/man/exp.350
-rw-r--r--lib/msun/man/hypot.311
-rw-r--r--lib/msun/man/j0.318
-rw-r--r--lib/msun/man/lgamma.39
-rw-r--r--lib/msun/man/sinh.315
-rw-r--r--lib/msun/man/sqrt.342
12 files changed, 44 insertions, 204 deletions
diff --git a/lib/msun/man/acos.3 b/lib/msun/man/acos.3
index 6004f32..a08230a 100644
--- a/lib/msun/man/acos.3
+++ b/lib/msun/man/acos.3
@@ -32,7 +32,7 @@
.\" from: @(#)acos.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD$
.\"
-.Dd May 2, 1991
+.Dd January 14, 2005
.Dt ACOS 3
.Os
.Sh NAME
@@ -66,27 +66,20 @@ and the
functions return the arc cosine in the range
.Bq 0 , \*(Pi
radians.
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if:
+If:
.Bd -unfilled -offset indent
.Pf \&| Ns Ar x Ns \&| > 1 ,
.Ed
.Pp
.Fn acos x
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and a reserved operand fault is generated.
+raises an invalid exception and returns an \*(Na.
.Sh SEE ALSO
.Xr asin 3 ,
.Xr atan 3 ,
.Xr atan2 3 ,
.Xr cos 3 ,
.Xr cosh 3 ,
+.Xr fenv 3 ,
.Xr math 3 ,
.Xr sin 3 ,
.Xr sinh 3 ,
diff --git a/lib/msun/man/acosh.3 b/lib/msun/man/acosh.3
index 2eb82d1..b133901 100644
--- a/lib/msun/man/acosh.3
+++ b/lib/msun/man/acosh.3
@@ -32,7 +32,7 @@
.\" from: @(#)acosh.3 5.2 (Berkeley) 5/6/91
.\" $FreeBSD$
.\"
-.Dd May 6, 1991
+.Dd January 14, 2005
.Dt ACOSH 3
.Os
.Sh NAME
@@ -66,22 +66,14 @@ and the
functions
return the inverse hyperbolic cosine of
.Ar x .
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if the argument is less than one
+If the argument is less than 1,
.Fn acosh
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and
-causes a reserved operand fault.
+raises an invalid exception and returns an \*(Na.
.Sh SEE ALSO
.Xr asinh 3 ,
.Xr atanh 3 ,
.Xr exp 3 ,
+.Xr fenv 3 ,
.Xr math 3
.Sh HISTORY
The
diff --git a/lib/msun/man/asin.3 b/lib/msun/man/asin.3
index f3ec7ac..e33623d 100644
--- a/lib/msun/man/asin.3
+++ b/lib/msun/man/asin.3
@@ -32,7 +32,7 @@
.\" from: @(#)asin.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD$
.\"
-.Dd May 2, 1991
+.Dd January 14, 2005
.Dt ASIN 3
.Os
.Sh NAME
@@ -68,27 +68,20 @@ functions return the arc sine in the range
.Bq -\*(Pi/2 , +\*(Pi/2
.Ek
radians.
-On the
-.Tn VAX ,
-and Tahoe,
-if:
+If:
.Bd -unfilled -offset indent
.Pf \&| Ns Ar x Ns \&| > 1
.Ed
.Pp
-the
-global variable
-.Va errno
-is set to
-.Er EDOM
-and
-a reserved operand fault generated.
+.Fn asin x
+raises an invalid exception and returns an \*(Na.
.Sh SEE ALSO
.Xr acos 3 ,
.Xr atan 3 ,
.Xr atan2 3 ,
.Xr cos 3 ,
.Xr cosh 3 ,
+.Xr fenv 3 ,
.Xr math 3 ,
.Xr sin 3 ,
.Xr sinh 3 ,
diff --git a/lib/msun/man/atan2.3 b/lib/msun/man/atan2.3
index f951812..3f56497 100644
--- a/lib/msun/man/atan2.3
+++ b/lib/msun/man/atan2.3
@@ -32,7 +32,7 @@
.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD$
.\"
-.Dd May 2, 1991
+.Dd January 14, 2005
.Dt ATAN2 3
.Os
.Sh NAME
@@ -69,16 +69,7 @@ in the range
.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi
.Ek
radians.
-If both
-.Fa x
-and
-.Fa y
-are zero, the global variable
-.Va errno
-is set to
-.Er EDOM .
-On the
-.Tn VAX :
+Here are some of the special cases:
.Bl -column atan_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___
.It Fn atan2 y x No := Ta
.Fn atan y/x Ta
@@ -105,9 +96,7 @@ The function
.Fn atan2
defines "if x > 0,"
.Fn atan2 0 0
-= 0 on a
-.Tn VAX
-despite that previously
+= 0 despite that previously
.Fn atan2 0 0
may have generated an error message.
The reasons for assigning a value to
@@ -144,8 +133,7 @@ is mapped to
.if n \
(r=0,theta=0)
.if t \
-(r=0,\(*h=0)
-on a VAX.
+(r=0,\(*h=0) .
In general, conversions to polar coordinates
should be computed thus:
.Bd -unfilled -offset indent
diff --git a/lib/msun/man/atanh.3 b/lib/msun/man/atanh.3
index cd9f276..10575c7 100644
--- a/lib/msun/man/atanh.3
+++ b/lib/msun/man/atanh.3
@@ -32,7 +32,7 @@
.\" from: @(#)atanh.3 5.2 (Berkeley) 5/6/91
.\" $FreeBSD$
.\"
-.Dd May 6, 1991
+.Dd January 14, 2005
.Dt ATANH 3
.Os
.Sh NAME
@@ -67,23 +67,16 @@ functions
return the inverse hyperbolic tangent of
.Ar x
if successful.
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if the argument has absolute value
-bigger than or equal to 1,
-.Fn atanh
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and
-a reserved operand fault is generated.
+If the argument has absolute value 1, a divide-by-zero exception
+is raised and an infinity is returned.
+If
+.Ar |x|
+> 1, an invalid exception is raised an an \*(Na is returned.
.Sh SEE ALSO
.Xr acosh 3 ,
.Xr asinh 3 ,
.Xr exp 3 ,
+.Xr fenv 3 ,
.Xr math 3
.Sh HISTORY
The
diff --git a/lib/msun/man/cosh.3 b/lib/msun/man/cosh.3
index d2b2824..74744d4 100644
--- a/lib/msun/man/cosh.3
+++ b/lib/msun/man/cosh.3
@@ -32,7 +32,7 @@
.\" from: @(#)cosh.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD$
.\"
-.Dd May 2, 1991
+.Dd January 14, 2005
.Dt COSH 3
.Os
.Sh NAME
@@ -54,18 +54,6 @@ and the
.Fn coshf
functions compute the hyperbolic cosine of
.Fa x .
-.Sh RETURN VALUES
-The
-.Fn cosh
-and the
-.Fn coshf
-functions return the hyperbolic cosine unless the magnitude
-of
-.Fa x
-is too large; in this event, the global variable
-.Va errno
-is set to
-.Er ERANGE .
.Sh SEE ALSO
.Xr acos 3 ,
.Xr asin 3 ,
diff --git a/lib/msun/man/exp.3 b/lib/msun/man/exp.3
index 62e9e3e..326af58 100644
--- a/lib/msun/man/exp.3
+++ b/lib/msun/man/exp.3
@@ -32,7 +32,7 @@
.\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91
.\" $FreeBSD$
.\"
-.Dd July 31, 1991
+.Dd January 14, 2005
.Dt EXP 3
.Os
.Sh NAME
@@ -182,49 +182,18 @@ is exact until it is bigger than 2**56 on a
These functions will return the appropriate computation unless an error
occurs or an argument is out of range.
The functions
-.Fn exp ,
-.Fn expm1 ,
-.Fn pow
-detect if the computed value will overflow,
-set the global variable
-.Va errno
-to
-.Er ERANGE
-and cause a reserved operand fault on a
-.Tn VAX
-or
-.Tn Tahoe .
-The functions
.Fn pow x y
-checks to see if
+and
+.Fn powf x y
+raise an invalid exception and return an \*(Na if
.Fa x
< 0 and
.Fa y
-is not an integer, in the event this is true,
-the global variable
-.Va errno
-is set to
-.Er EDOM
-and on the
-.Tn VAX
-and
-.Tn Tahoe
-generate a reserved operand fault.
-On a
-.Tn VAX
-and
-.Tn Tahoe ,
-.Va errno
-is set to
-.Er EDOM
-and the reserved operand is returned
-by log unless
-.Fa x
-> 0, by
-.Fn log1p
-unless
-.Fa x
-> \-1.
+is not an integer.
+An attempt to take the logarithm of \*(Pm0 will result in
+a divide-by-zero exception, and an infinity will be returned.
+An attempt to take the logarithm of a negative number will
+result in an invalid exception, and an \*(Na will be generated.
.Sh NOTES
The functions exp(x)\-1 and log(1+x) are called
expm1 and logp1 in
@@ -304,6 +273,7 @@ then \*(Na**0 = 1 too because x**0 = 1 for all finite
and infinite x, i.e., independently of x.
.El
.Sh SEE ALSO
+.Xr fenv 3 ,
.Xr math 3
.Sh HISTORY
A
diff --git a/lib/msun/man/hypot.3 b/lib/msun/man/hypot.3
index 3124578..4843e44 100644
--- a/lib/msun/man/hypot.3
+++ b/lib/msun/man/hypot.3
@@ -32,7 +32,7 @@
.\" from: @(#)hypot.3 6.7 (Berkeley) 5/6/91
.\" $FreeBSD$
.\"
-.Dd May 6, 1991
+.Dd January 14, 2005
.Dt HYPOT 3
.Os
.Sh NAME
@@ -98,13 +98,8 @@ and
.Fn hypot "\*(Na" "v"
are \*(Na for all
.Em finite
-.Fa v ;
-with "reserved operand" in place of "\*(Na", the
-same is true on a
-.Tn VAX .
-But programmers on machines other than a
-.Tn VAX
-(if has no \*(If)
+.Fa v .
+But programmers
might be surprised at first to discover that
.Fn hypot "\(+-\*(If" "\*(Na"
= +\*(If.
diff --git a/lib/msun/man/j0.3 b/lib/msun/man/j0.3
index 006119f..2d80810 100644
--- a/lib/msun/man/j0.3
+++ b/lib/msun/man/j0.3
@@ -32,7 +32,7 @@
.\" from: @(#)j0.3 6.7 (Berkeley) 4/19/91
.\" $FreeBSD$
.\"
-.Dd April 19, 1991
+.Dd January 14, 2005
.Dt J0 3
.Os
.Sh NAME
@@ -134,22 +134,6 @@ value
.Sh RETURN VALUES
If these functions are successful,
the computed value is returned.
-On the
-.Tn VAX
-and
-.Tn Tahoe
-architectures,
-for the Bessel functions of the second kind,
-a negative
-or zero
-.Fa x
-value
-results in an error; the global
-variable
-.Va errno
-is set to
-.Er EDOM
-and a reserve operand fault is generated.
.Sh SEE ALSO
.Xr math 3
.Sh HISTORY
diff --git a/lib/msun/man/lgamma.3 b/lib/msun/man/lgamma.3
index e950908..085de97 100644
--- a/lib/msun/man/lgamma.3
+++ b/lib/msun/man/lgamma.3
@@ -32,7 +32,7 @@
.\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92
.\" $FreeBSD$
.\"
-.Dd December 3, 1992
+.Dd January 14, 2005
.Dt LGAMMA 3
.Os
.Sh NAME
@@ -149,13 +149,6 @@ and
return appropriate values unless an argument is out of range.
Overflow will occur for sufficiently large positive values, and
non-positive integers.
-On the
-.Tn VAX ,
-the reserved operator is returned,
-and
-.Va errno
-is set to
-.Er ERANGE .
For large non-integer negative values,
.Fn tgamma
will underflow.
diff --git a/lib/msun/man/sinh.3 b/lib/msun/man/sinh.3
index ce3808c..f7e6995 100644
--- a/lib/msun/man/sinh.3
+++ b/lib/msun/man/sinh.3
@@ -31,7 +31,7 @@
.\"
.\" from: @(#)sinh.3 6.6 (Berkeley) 4/19/91
.\" $FreeBSD$
-.Dd April 19, 1991
+.Dd January 14, 2005
.Dt SINH 3
.Os
.Sh NAME
@@ -53,19 +53,6 @@ and the
.Fn sinhf
functions compute the hyperbolic sine of
.Fa x .
-.Sh RETURN VALUES
-The
-.Fn sinh
-and the
-.Fn sinhf
-functions return the hyperbolic sine value unless
-the magnitude
-of
-.Fa x
-is too large; in this event, the global variable
-.Va errno
-is set to
-.Er ERANGE .
.Sh SEE ALSO
.Xr acos 3 ,
.Xr asin 3 ,
diff --git a/lib/msun/man/sqrt.3 b/lib/msun/man/sqrt.3
index d4abf01..9939900 100644
--- a/lib/msun/man/sqrt.3
+++ b/lib/msun/man/sqrt.3
@@ -80,49 +80,13 @@ and the
.Fn sqrtf
functions return the requested square root
unless an error occurs.
-On the
-.Tn VAX
-or
-.Tn Tahoe
-processor an attempt to take the
+An attempt to take the
.Fn sqrt
of negative
.Fa x
-causes an error; in this event,
-the global variable
-.Va errno
-is set to
-.Er EDOM
-and a reserved operand fault is generated.
-.Sh ERROR (due to Roundoff etc.)
-The
-.Fn cbrt
-function
-is accurate to within 0.7
-.Em ulps .
-.Pp
-The
-.Fn sqrt
-function on a
-.Tn VAX
-is accurate to within 0.501
-.Em ulps .
-Sqrt on a machine that conforms to
-.Tn IEEE
-754 is correctly rounded
-in accordance with the rounding mode in force; the error is less than
-half an
-.Em ulp
-in the default mode (round\-to\-nearest).
-An
-.Em ulp
-is one
-.Em U Ns nit
-in the
-.Em L Ns ast
-.Em P Ns lace
-carried.
+raises an invalid exception and causes an \*(Na to be returned.
.Sh SEE ALSO
+.Xr fenv 3 ,
.Xr math 3
.Sh STANDARDS
The
OpenPOWER on IntegriCloud