#44086 [Opn]: dividing problem

From: Date: Sat, 09 Feb 2008 16:43:22 +0000
Subject: #44086 [Opn]: dividing problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122121@lists.php.net to get a copy of this message
ID: 44086 User updated by: hosting at indiannic dot com Reported By: hosting at indiannic dot com Status: Open Bug Type: Math related Operating System: windows 2000 PHP Version: 5.3CVS-2008-02-09 (snap) New Comment: note that if you use command line to check the answers are correct [marcus@zaphod PHP_5_3]$ php -r 'var_dump(46985.532 / 3600 );' make: `sapi/cli/php' is up to date. float(13.051536666667) if you however put it on windows 2000 and iis 5 webserver the results are incorrect ... Previous Comments: ------------------------------------------------------------------------ [2008-02-09 16:37:49] hosting at indiannic dot com 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 this bug report at http://bugs.php.net/?id=44086&edit=1

« previous php.bugs (#122121) next »