From:             
Operating system: Linux 2.6.33.3-85.fc13
PHP version:      5.3.5
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:(int)(1.13*100) returns 112 !!!!! (should be 113)

Description:
------------
Sample code below returns 112 instead of 113. echo (int)(113); and echo
1.13*100; 

works just fine.



Other numbers like 2.13, 1.14 works fine



Well, in fact i use php 5.3.3. No i wont upgrade. I've post some bug a few
years 

ago and still get no response. So i post it here just in case. Go ahead,
mark it 

as "could not reproduce" and go get one more cup of coffee... Or you can
really 

check it, bug looks a bit ugly.

Test script:
---------------
<?php



echo (int)(1.13*100);



?>

Expected result:
----------------
113

Actual result:
--------------
112

-- 
Edit bug report at http://bugs.php.net/bug.php?id=54184&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54184&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54184&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54184&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54184&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54184&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54184&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54184&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54184&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54184&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54184&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54184&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54184&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54184&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54184&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54184&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54184&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54184&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54184&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54184&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54184&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54184&r=mysqlcfg

Reply via email to