|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-04-15 01:22 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2015-04-15 01:22 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 16:00:01 2025 UTC |
Description: ------------ (2.4 - 2.4) must be 0! now it -8.8817841970013E-16 Test script: --------------- $m = 12; for($l=0; $l<12; $l++) { $m = $m - 2.4; echo "<br>".$l.": ".$m; } Expected result: ---------------- 0: 9.6 1: 7.2 2: 4.8 3: 2.4 4: 0 5: -2.4 6: -4.8 7: -7.2 8: -9.6 9: -12 10: -14.4 11: -16.8 Actual result: -------------- 0: 9.6 1: 7.2 2: 4.8 3: 2.4 4: -8.8817841970013E-16 5: -2.4 6: -4.8 7: -7.2 8: -9.6 9: -12 10: -14.4 11: -16.8