|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-05-27 22:11 UTC] yohgaki@php.net
[2021-07-16 12:51 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2021-07-16 12:51 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 01:00:01 2025 UTC |
Description: ------------ One would expect 0.9 * -0.1 to yield the same result as 0.90 * -0.1, with BCMath, but alas, this does not appear to be the case. Test script: --------------- <?php $a = bcmul('0.9', '-0.1', 1); $b = bcmul('0.90', '-0.1', 1); echo $a === $b ? 'same' : 'different'; echo "\n$a\n$b"; Expected result: ---------------- I would expect $a === $b to be true. Actual result: -------------- $a === $b is false. $a is 0.0, $b is -0.0.