Module Name: src Committed By: jruoho Date: Sat Sep 17 10:52:52 UTC 2011
Modified Files: src/lib/libm/man: exp.3 Log Message: Remove rest of the NOTES and ERRORS and references to pow(3) family. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libm/man/exp.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libm/man/exp.3 diff -u src/lib/libm/man/exp.3:1.27 src/lib/libm/man/exp.3:1.28 --- src/lib/libm/man/exp.3:1.27 Tue Sep 13 05:26:47 2011 +++ src/lib/libm/man/exp.3 Sat Sep 17 10:52:52 2011 @@ -27,7 +27,7 @@ .\" .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD: src/lib/msun/man/exp.3,v 1.24 2008/01/18 21:43:00 das Exp $ -.\" $NetBSD: exp.3,v 1.27 2011/09/13 05:26:47 jruoho Exp $ +.\" $NetBSD: exp.3,v 1.28 2011/09/17 10:52:52 jruoho Exp $ .\" .Dd September 13, 2011 .Dt EXP 3 @@ -41,9 +41,7 @@ .\" .Nm exp2l , .Nm expm1 , .Nm expm1f , -.Nm pow , -.Nm powf -.Nd exponential and power functions +.Nd exponential functions .Sh LIBRARY .Lb libm .Sh SYNOPSIS @@ -62,10 +60,6 @@ .Fn expm1 "double x" .Ft float .Fn expm1f "float x" -.Ft double -.Fn pow "double x" "double y" -.Ft float -.Fn powf "float x" "float y" .Sh DESCRIPTION The .Fn exp @@ -92,24 +86,13 @@ .Fn expm1f functions computes the value exp(x)\-1 accurately even for tiny argument .Fa x . -.Pp -The -.Fn pow -and -.Fn powf -functions compute the value -of -.Ar x -to the exponent -.Ar y . .Sh RETURN VALUES 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 exp and -.Fn pow +.Fn expm1 detect if the computed value will overflow, set the global variable .Va errno @@ -117,127 +100,11 @@ .Er ERANGE and cause a reserved operand fault on a .Tn VAX . -The function -.Fn pow x y -checks to see if -.Fa x -\*[Lt] 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 -generate a reserved operand fault. -.Sh ERRORS -The values of -.Fn exp x , -.Fn expm1 x , -and -.Fn exp2 x , -are exact provided that they are representable. -Otherwise the error in these functions is generally below one -.Em ulp . -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 x y -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 function -.Fn pow x 0 -returns x**0 = 1 for all x including x = 0, -.if n \ -Infinity -.if t \ -\(if -(not found on a -.Tn VAX ) , -and -.Em NaN -(the reserved -operand on a -.Tn VAX ) . -Previous implementations of pow may -have defined x**0 to be undefined in some or all of these -cases. -Here are reasons for returning x**0 = 1 always: -.Bl -enum -width indent -.It -Any program that already tests whether x is zero (or -infinite or \*(Na) before computing x**0 cannot care -whether 0**0 = 1 or not. -Any program that depends -upon 0**0 to be invalid is dubious anyway since that -expression's meaning and, if invalid, its consequences -vary from one computer system to another. -.It -Some Algebra texts (e.g. Sigler's) define x**0 = 1 for -all x, including x = 0. -This is compatible with the convention that accepts a[0] -as the value of polynomial -.Bd -literal -offset indent -p(x) = a[0]\(**x**0 + a[1]\(**x**1 + a[2]\(**x**2 +...+ a[n]\(**x**n -.Ed -.Pp -at x = 0 rather than reject a[0]\(**0**0 as invalid. -.It -Analysts will accept 0**0 = 1 despite that x**y can -approach anything or nothing as x and y approach 0 -independently. -The reason for setting 0**0 = 1 anyway is this: -.Bd -filled -offset indent -If x(z) and y(z) are -.Em any -functions analytic (expandable -in power series) in z around z = 0, and if there -x(0) = y(0) = 0, then x(z)**y(z) \(-\*[Gt] 1 as z \(-\*[Gt] 0. -.Ed -.It -If 0**0 = 1, then -.if n \ -infinity**0 = 1/0**0 = 1 too; and -.if t \ -\(if**0 = 1/0**0 = 1 too; and -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 math 3 .Sh STANDARDS The .Fn exp -and -.Fn pow functions conform to .St -ansiC . The @@ -245,18 +112,14 @@ .Fn exp2f , .Fn expf , .Fn expm1 , -.Fn expm1f , and -.Fn powf +.Fn expm1f functions conform to .St -isoC-99 . .Sh HISTORY -A +The .Fn exp -and -.Fn pow -functions -appeared in +functions appeared in .At v6 . The .Fn expm1