diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2003-06-02 10:42:44 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2003-06-02 10:42:44 +0000 |
commit | 21e399fd2f0cd0d4f0493d59016355a698e2b733 (patch) | |
tree | e15632bb164aa5bac1d41f4672191d59e2c5c206 /lib | |
parent | 52a17f21c57e6a5a6d6d4a8c117666da3dd56343 (diff) |
section reorder;
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/man/exp.3 | 92 | ||||
-rw-r--r-- | lib/libm/man/hypot.3 | 16 | ||||
-rw-r--r-- | lib/libm/man/ieee.3 | 6 | ||||
-rw-r--r-- | lib/libm/man/math.3 | 28 |
4 files changed, 71 insertions, 71 deletions
diff --git a/lib/libm/man/exp.3 b/lib/libm/man/exp.3 index 025f30b3e4d..a136d4d98b8 100644 --- a/lib/libm/man/exp.3 +++ b/lib/libm/man/exp.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: exp.3,v 1.14 2003/05/20 09:17:51 jmc Exp $ +.\" $OpenBSD: exp.3,v 1.15 2003/06/02 10:42:43 jmc Exp $ .\" .\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. @@ -134,51 +134,6 @@ The .Fn powf function is a single precision version of .Fn pow . -.Sh ERRORS (due to Roundoff etc.) -exp(x), log(x), expm1(x) and log1p(x) are accurate to within -an -.Em ulp , -and log10(x) to within about 2 -.Em ulps ; -an -.Em ulp -is one -.Em Unit -in the -.Em Last -.Em Place . -The error in -.Fn pow x y -is below about 2 -.Em ulps -when its -magnitude is moderate, but increases as -.Fn pow x y -approaches -the over/underflow thresholds until almost as many bits could be -lost as are occupied by the floating\-point format's exponent -field; that is 8 bits for -.Tn "VAX D" -and 11 bits for IEEE 754 Double. -No such drastic loss has been exposed by testing; the worst -errors observed have been below 20 -.Em ulps -for -.Tn "VAX D" , -300 -.Em ulps -for -.Tn IEEE -754 Double. -Moderate values of -.Fn pow -are accurate enough that -.Fn pow integer integer -is exact until it is bigger than 2**56 on a -.Tn VAX , -2**53 for -.Tn IEEE -754. .Sh RETURN VALUES These functions will return the appropriate computation unless an error occurs or an argument is out of range. @@ -227,6 +182,51 @@ by log unless unless .Fa x > \-1. +.Sh ERRORS (due to Roundoff etc.) +exp(x), log(x), expm1(x) and log1p(x) are accurate to within +an +.Em ulp , +and log10(x) to within about 2 +.Em ulps ; +an +.Em ulp +is one +.Em Unit +in the +.Em Last +.Em Place . +The error in +.Fn pow x y +is below about 2 +.Em ulps +when its +magnitude is moderate, but increases as +.Fn pow x y +approaches +the over/underflow thresholds until almost as many bits could be +lost as are occupied by the floating\-point format's exponent +field; that is 8 bits for +.Tn "VAX D" +and 11 bits for IEEE 754 Double. +No such drastic loss has been exposed by testing; the worst +errors observed have been below 20 +.Em ulps +for +.Tn "VAX D" , +300 +.Em ulps +for +.Tn IEEE +754 Double. +Moderate values of +.Fn pow +are accurate enough that +.Fn pow integer integer +is exact until it is bigger than 2**56 on a +.Tn VAX , +2**53 for +.Tn IEEE +754. .Sh NOTES The functions exp(x)\-1 and log(1+x) are called expm1 and logp1 in diff --git a/lib/libm/man/hypot.3 b/lib/libm/man/hypot.3 index 16e1d468701..4bfe6331efa 100644 --- a/lib/libm/man/hypot.3 +++ b/lib/libm/man/hypot.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hypot.3,v 1.10 2003/05/20 09:17:51 jmc Exp $ +.\" $OpenBSD: hypot.3,v 1.11 2003/06/02 10:42:43 jmc Exp $ .\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. .\" @@ -126,13 +126,6 @@ the \*(Na is designed to disappear when it turns out to be irrelevant, as it does in .Fn hypot "\*(If" "\*(Na" . -.Sh BUGS -The -.Fn cabs -and -.Fn cabsf -functions use structures that are not defined in any header and need to -be defined by the user. As such they cannot be prototyped properly. .Sh SEE ALSO .Xr math 3 , .Xr sqrt 3 @@ -144,3 +137,10 @@ function and a function appeared in .At v7 . +.Sh BUGS +The +.Fn cabs +and +.Fn cabsf +functions use structures that are not defined in any header and need to +be defined by the user. As such they cannot be prototyped properly. diff --git a/lib/libm/man/ieee.3 b/lib/libm/man/ieee.3 index a3e4598f84f..5c0c58d4c0d 100644 --- a/lib/libm/man/ieee.3 +++ b/lib/libm/man/ieee.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ieee.3,v 1.8 2003/05/20 09:17:51 jmc Exp $ +.\" $OpenBSD: ieee.3,v 1.9 2003/06/02 10:42:43 jmc Exp $ .\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. .\" @@ -185,10 +185,10 @@ function is a single precision version of .Fn scalbn . .Sh SEE ALSO .Xr math 3 +.Sh STANDARDS +.St -ieee754 .Sh HISTORY The .Nm ieee functions appeared in .Bx 4.3 . -.Sh STANDARDS -.St -ieee754 diff --git a/lib/libm/man/math.3 b/lib/libm/man/math.3 index 273503b251b..fd98233f03f 100644 --- a/lib/libm/man/math.3 +++ b/lib/libm/man/math.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: math.3,v 1.16 2003/05/05 18:44:43 jason Exp $ +.\" $OpenBSD: math.3,v 1.17 2003/06/02 10:42:43 jmc Exp $ .\" Copyright (c) 1985 Regents of the University of California. .\" All rights reserved. .\" @@ -694,19 +694,6 @@ response will serve most instances satisfactorily, the unsatisfactory instances cannot justify aborting computation every time the exception occurs. .El -.Sh BUGS -When signals are appropriate, they are emitted by certain -operations within -.Em libm , -so a subroutine-trace may be needed to identify the function with its -signal in case method 5) above is in use. -All the code in -.Em libm -takes the -.St -ieee754 -defaults for granted; this means that a decision to -trap all divisions by zero could disrupt a function that would -otherwise get a correct result despite division by zero. .Sh SEE ALSO An explanation of .St -ieee754 @@ -726,3 +713,16 @@ magazine COMPUTER vol. 14 no. 3 (Mar. 1981), and in the .Tn ACM SIGNUM Newsletter Special Issue of Oct. 1979, may be helpful although they pertain to superseded drafts of the standard. +.Sh BUGS +When signals are appropriate, they are emitted by certain +operations within +.Em libm , +so a subroutine-trace may be needed to identify the function with its +signal in case method 5) above is in use. +All the code in +.Em libm +takes the +.St -ieee754 +defaults for granted; this means that a decision to +trap all divisions by zero could disrupt a function that would +otherwise get a correct result despite division by zero. |