ID:               39262
 User updated by:  cjjer at hotmail dot com
-Summary:          intval function failed
 Reported By:      cjjer at hotmail dot com
 Status:           Open
 Bug Type:         Math related
 Operating System: windows2k
-PHP Version:      5.1.6
+PHP Version:      5.1.X
 New Comment:

[code]
for($i=0.0; $i<1;){
        echo intval(($i+0.10)*10.0).'<br/>'; 
        $i=$i+0.1;
}
[/code]


Previous Comments:
------------------------------------------------------------------------

[2006-10-26 08:43:33] 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



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39262&edit=1

Reply via email to