Add note regarding possibly truncated scale

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343030 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2017-09-09 13:09:19 +00:00
parent ae833792af
commit f59b53e589

View file

@ -67,6 +67,28 @@ echo bcmul('2', '4'); // 8
</example>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
<function>bcmul</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 bcmul('5', '2', 2); // prints "10", not "10.00"
?>
]]>
</programlisting>
</example>
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>