|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-02 18:03 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 21:00:01 2025 UTC |
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)