ljbuesch Wed May 16 21:48:14 2007 UTC
Modified files:
/phpdoc/en/reference/math/functions pow.xml
Log:
Fix for bug#41108. PHP can handle negative exponents.
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/math/functions/pow.xml?r1=1.11&r2=1.12&diff_format=u
Index: phpdoc/en/reference/math/functions/pow.xml
diff -u phpdoc/en/reference/math/functions/pow.xml:1.11
phpdoc/en/reference/math/functions/pow.xml:1.12
--- phpdoc/en/reference/math/functions/pow.xml:1.11 Sat Mar 31 19:18:23 2007
+++ phpdoc/en/reference/math/functions/pow.xml Wed May 16 21:48:14 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<refentry id="function.pow">
<refnamediv>
<refname>pow</refname>
@@ -16,11 +16,6 @@
Returns <parameter>base</parameter> raised to the power of
<parameter>exp</parameter>.
</para>
- <note>
- <para>
- PHP cannot handle negative <parameter>exp</parameter>s.
- </para>
- </note>
<warning>
<para>
In PHP 4.0.6 and earlier <function>pow</function> always returned
@@ -76,7 +71,8 @@
<entry>Since 4.0.6</entry>
<entry>
The function will now return <type>integer</type> results if possible,
- before this it always returned a <type>float</type> result.
+ before this it always returned a <type>float</type> result. For older
+ versions, you may receive a bogus result for complex numbers.
</entry>
</row>
<row>
@@ -104,8 +100,8 @@
echo pow(-1, 20); // 1
echo pow(0, 0); // 1
-echo pow(-1, 5.5); // error
-
+echo pow(-1, 5.5); // PHP >4.0.6 NAN
+echo pow(-1, 5.5); // PHP <=4.0.6 1.#IND
?>
]]>
</programlisting>