Fix (doc) bug #52748 (bcpow() - scale parameter doesn't influensce the result

string) by adding a clarifying note about bcpow's exact behaviour when dealing
with scale.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303202 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Harvey 2010-09-09 05:45:41 +00:00
parent 97bbfc32c8
commit f5cf724823

View file

@ -67,6 +67,28 @@ echo bcpow('4.2', '3', 2); // 74.08
</programlisting>
</example>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
<function>bcpow</function> may return a result with fewer digits after the
decimal point than the <parameter>scale</parameter> parameter would
indicate. This only occurs when the result doesn't require all of the
precision allowed by the <parameter>scale</parameter>. For example:
<example>
<title><function>bcpow</function> scale example</title>
<programlisting role="php">
<![CDATA[
<?php
echo bcpow('5', '2', 2); // prints "25", not "25.00"
?>
]]>
</programlisting>
</example>
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;