#44086 [NEW]: dividing problem

From: Date: Sat, 09 Feb 2008 16:37:49 +0000
Subject: #44086 [NEW]: dividing problem
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122120@lists.php.net to get a copy of this message
From:             hosting at indiannic dot com
Operating system: windows 2000
PHP version:      5.3CVS-2008-02-09 (snap)
PHP Bug Type:     Math related
Bug description:  dividing problem

Description:
------------
division of float values give irrational results.
we have php version 4.3.10 and php 5.2.5 on the same server

this link is on php 5.2.5
http://maptelltrack.com/divide.php
this gives correct Wrong answer

this is on php 4.3.10
http://maptell.com/divide.php
this gives correct answer

when we use command line ie php 

Reproduce code:
---------------
<?php
$value = var_dump (46985.532 / 3600) ;
 echo($value);
?>


Expected result:
----------------
float(10)

Actual result:
--------------
float(13.0515366667)

-- 
Edit bug report at http://bugs.php.net/?id=44086&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44086&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44086&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44086&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44086&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44086&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=44086&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44086&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44086&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44086&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44086&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44086&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=44086&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=44086&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44086&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=44086&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=44086&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44086&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44086&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44086&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44086&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44086&r=mysqlcfg


Thread (5 messages)

« previous php.bugs (#122120) next »