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.
This commit is contained in:
parent
52378c7ead
commit
8e26469445
@ -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 ,
|
||||
|
@ -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
|
||||
|
@ -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 ,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 ,
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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 ,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user