#33549 [Ver->Csd]: Wrong result with bcmul()
| From: | mazzanet@php.net | Date: | Mon, 04 Jul 2005 07:28:41 +0000 |
| Subject: | #33549 [Ver->Csd]: Wrong result with bcmul() | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969368919@lists.php.net to get a copy of this message | ||
ID: 33549
Updated by: mazzanet@php.net
Reported By: a dot schilder at gmx dot de
-Status: Verified
+Status: Closed
Bug Type: Documentation problem
Operating System: Win XP SP2
PHP Version: 5.0.4
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2005-07-04 01:38:03] sniper@php.net
If you pass the numbers as strings (as expected, although the manual
has it wrong in the example), this works fine:
bcmul("1", "0.00001", 5);
Reclassified as documentation issue. (the bad examples in bcmath
section)
------------------------------------------------------------------------
[2005-07-02 18:03:12] a dot schilder at gmx dot de
Description:
------------
The result returned by bcmul() with the factor X (greater than 0) and
0.00001 is 0 - it's not the expected result.
Reproduce code:
---------------
// Does not work - result is 0:
bcmul(1, 0.00001, 5);
// This workaround does it - result 0.00001:
bcdiv(bcmul(1, 0.00010, 5), 10, 5);
Expected result:
----------------
The correct result 0.00001
Actual result:
--------------
0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33549&edit=1