New pow() documentation to reflect 407-changes

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@53263 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jeroen van Wolffelaar 2001-08-04 13:08:04 +00:00
parent bf8d09407f
commit e8558faecb

View file

@ -1,4 +1,4 @@
<!-- $Revision: 1.39 $ -->
<!-- $Revision: 1.40 $ -->
<reference id="ref.math">
<title>Mathematical Functions</title>
<titleabbrev>Math</titleabbrev>
@ -974,16 +974,42 @@ echo pi();
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>float <function>pow</function></funcdef>
<paramdef>float <parameter>base</parameter></paramdef>
<paramdef>float <parameter>exp</parameter></paramdef>
<funcdef>number <function>pow</function></funcdef>
<paramdef>number <parameter>base</parameter></paramdef>
<paramdef>number <parameter>exp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns <parameter>base</parameter> raised to the power of
<parameter>exp</parameter>. If this can't be computed,
<function>exp</function> will return <literal>NAN</literal>.
<parameter>exp</parameter>. If possible, this function will
return an <type>integer</type>.
</para>
<para>
If the power cannot be computed, a warning will be issued,
and <function>pow</function> will return &false;.
</para>
<example>
<title>Some examples of <function>pow</function></title>
<programlisting role="php">
<![CDATA[
<?php
var_dump( pow(2,8) ); // int(256)
echo pow(-1,20); // 1
echo pow(0, 0); // 1
echo pow(-1, 5.5); // error
?>
]]>
</programlisting>
</example>
<warning>
<para>
In PHP 4.0.6 and earlier <function>pow</function> always returned
a <type>float</type>, and did not issue warnings.
</para>
</warning>
<para>
See also <function>exp</function>.
</para>
@ -1219,4 +1245,5 @@ sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim: ts=4 sw=4 et syntax=sgml
-->