|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-14 23:49 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 00:00:02 2025 UTC |
Description: ------------ With a for, if you count to 100, it will miscounts after a while. (with other computers it wil miscount earlier) Reproduce code: --------------- for ($i = 0; $i <= 800; $i += 0.01) { echo $i.'<br/>'; } Expected result: ---------------- 709.23 709.24 709.25 709.26 709.27 709.28 709.29 Actual result: -------------- 709.23 709.24 709.25 709.259999999 709.269999999 709.279999999 709.289999999