X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=original%2Fman3%2Fpow.3;h=8e739658bc21da0dd1f482a276bcec0337068d9a;hp=dad07b7bbd9290ace772e889d099d5cf9a13e9d1;hb=4ea6bb24817f6f049d6bbc90ecd77a869876f9b0;hpb=633a2252e0be3c867dce264a180a89ce8181d36f diff --git a/original/man3/pow.3 b/original/man3/pow.3 index dad07b7b..8e739658 100644 --- a/original/man3/pow.3 +++ b/original/man3/pow.3 @@ -2,6 +2,7 @@ .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" +.\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. @@ -21,6 +22,7 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code @@ -30,7 +32,7 @@ .\" Modified 1995-08-14 by Arnt Gulbrandsen .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) -.TH POW 3 2008-08-10 "" "Linux Programmer's Manual" +.TH POW 3 2014-12-31 "" "Linux Programmer's Manual" .SH NAME pow, powf, powl \- power functions .SH SYNOPSIS @@ -54,14 +56,22 @@ Feature Test Macro Requirements for glibc (see .ad l .BR powf (), .BR powl (): -_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or +.RS 4 +_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || +_POSIX_C_SOURCE\ >=\ 200112L; +.br +or .I cc\ -std=c99 -.ad b +.RE +.ad .SH DESCRIPTION The .BR pow () -function returns the value of \fIx\fP raised to the -power of \fIy\fP. +function returns the value of +.I x +raised to the +power of +.IR y . .SH RETURN VALUE On success, these functions return the value of .I x @@ -217,7 +227,7 @@ the result is positive infinity. If .I x -is +0 or -0, +is +0 or \-0, and .I y is an odd integer less than 0, @@ -232,7 +242,7 @@ with the same sign as If .I x -is +0 or -0, +is +0 or \-0, and .I y is less than 0 and not an odd integer, @@ -284,7 +294,6 @@ Pole error: \fIx\fP is zero, and \fIy\fP is negative is set to .BR ERANGE (but see BUGS). -.\" FIXME . glibc 2.8 gives EDOM A divide-by-zero floating-point exception .RB ( FE_DIVBYZERO ) is raised. @@ -304,22 +313,39 @@ is set to An underflow floating-point exception .RB ( FE_UNDERFLOW ) is raised. -.SH "CONFORMING TO" +.SH CONFORMING TO C99, POSIX.1-2001. The variant returning .I double also conforms to SVr4, 4.3BSD, C89. .SH BUGS -For a pole error, +On 64-bits, +.\" +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=13932 +.BR pow () +may be more than 10,000 times slower for some (rare) inputs +than for other nearby inputs. +This affects only +.BR pow (), +and not +.BR powf () +nor +.BR powl (). + +In glibc 2.9 and earlier, .\" -.\" FIXME . this is as at glibc 2.8; check later if this bug is fixed -.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6776 +.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6776 +when a pole error occurs, .I errno is set to -.BR EDOM ; -POSIX.1 says it should be set to +.BR EDOM +instead of the POSIX-mandated .BR ERANGE . +Since version 2.10, +.\" or possibly 2.9, I haven't found the source code change +.\" and I don't have a 2.9 system to test +glibc does the right thing. If .I x @@ -349,7 +375,16 @@ when an overflow or underflow error occurs, glibc's generates a bogus invalid floating-point exception .RB ( FE_INVALID ) in addition to the overflow or underflow exception. -.SH "SEE ALSO" +.SH SEE ALSO .BR cbrt (3), .BR cpow (3), .BR sqrt (3) +.SH COLOPHON +This page is part of release 3.79 of the Linux +.I man-pages +project. +A description of the project, +information about reporting bugs, +and the latest version of this page, +can be found at +\%http://www.kernel.org/doc/man\-pages/.