#44088 [NEW]: dividing float values gives irrational results
| From: | hosting at indiannic dot com | Date: | Sun, 10 Feb 2008 03:07:49 +0000 |
| Subject: | #44088 [NEW]: dividing float values gives irrational results | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-122137@lists.php.net to get a copy of this message | ||
From: hosting at indiannic dot com
Operating system: windows 2000
PHP version: 5.2CVS-2008-02-10 (CVS)
PHP Bug Type: Math related
Bug description: dividing float values gives irrational results
Description:
------------
os : windows 2000, iis 5 upto date with will microsoft patches
we have two independent websites each using two versions of php on the
same server
same sample php code as given below placed on each website
http://maptelltrack.com/divide.php (php 4.3.10
gives wrong results)
http://maptell.com/divide.php (php 5.2.6 gives correct
results)
php 4.3.10 gives correct results and php5.2.5 gives Wrong results for the
same php code on the web server
php info file for each website
http://maptelltrack.com/info.php (php 5.2.5) using
php-cgi.exe
(we have tried all versions upto php5.2-win32-latest)
http://maptell.com/info.php (php 4.3.10) using php.exe
Please do not try the same with command line since the results are
different.
Reproduce code:
---------------
<?php
$test = var_dump (46985.532 / 3600) ;
echo($test);
?>
Expected result:
----------------
float(13.0515366667)
Actual result:
--------------
float(10)
--
Edit bug report at http://bugs.php.net/?id=44088&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44088&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44088&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44088&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44088&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44088&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44088&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44088&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44088&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44088&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44088&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44088&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44088&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44088&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44088&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44088&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=44088&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44088&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44088&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44088&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44088&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44088&r=mysqlcfg