|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-10-26 08:43 UTC] cjjer at hotmail dot com
Description: ------------ intval function failed ;for intval((0.1+0.7)*10) not is 8 ,but 7. Reproduce code: --------------- 1 2 3 4 5 6 7 7 9 9 10 Expected result: ---------------- 1 2 3 4 5 6 7 8 9 9 10 Actual result: -------------- 1 2 3 4 5 6 7 7 9 9 10 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 04:00:01 2025 UTC |
[code] for($i=0.0; $i<1;){ echo intval(($i+0.10)*10.0).'<br/>'; $i=$i+0.1; } [/code]