ID:               49187
 Updated by:       j...@php.net
 Reported By:      belanger dot b at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *Math Functions
 Operating System: Linux
-PHP Version:      5.2.10
+PHP Version:      5.2.5
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




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

[2009-08-07 05:51:09] belanger dot b at gmail dot com

Tested it with all values from previously rejected or ignored similar
bug submissions (code and execution here) :
http://www.benlg.com/test.php

P.S.: intval('9.95'*100) == intval(9.95*100) == 994

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

[2009-08-07 05:20:11] belanger dot b at gmail dot com

Description:
------------
intval is not returning the correct value for '995'

echo number_format('9.95'*100,0,'',''); // output 995
echo intval('9.95'*100); // output 994

Sorry but the most up to date server at my disposition is version
5.2.5

POSSIBLY RELATED REFUSED BUGS...
found by me :
http://bugs.php.net/bug.php?id=1960 (set to closed)
found by system :
http://bugs.php.net/bug.php?id=37554 (set to bogus)
http://bugs.php.net/bug.php?id=39900 (set to bogus)

Reproduce code:
---------------
echo number_format('9.95'*100,0,'','')
     .' and '. number_format('1.16'*100,0,'','')
     ."\n". intval('9.95'*100);
     .' and '. intval('1.16'*100);

Expected result:
----------------
995 and 116
995 and 116

Actual result:
--------------
995 and 116
994 and 115


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


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

Reply via email to