mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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:
parent
97bbfc32c8
commit
f5cf724823
1 changed files with 22 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue