|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44086 dividing problem
Submitted: 2008-02-09 16:37 UTC Modified: 2008-02-10 05:19 UTC
From: hosting at indiannic dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.3CVS-2008-02-09 (snap) OS: windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hosting at indiannic dot com
New email:
PHP Version: OS:


 [2008-02-09 16:37 UTC] hosting at indiannic dot com
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
this gives correct Wrong answer

this is on php 4.3.10
this gives correct answer

when we use command line ie php 

Reproduce code:
$value = var_dump (46985.532 / 3600) ;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-09 16:43 UTC] hosting at indiannic dot com
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.

if you however put it on windows 2000 and iis 5 webserver the results are incorrect ...
 [2008-02-09 17:01 UTC] hosting at indiannic dot com

by mistake i reversed the expected and actual result

it shud be as such

Expected result:

Actual result:
 [2008-02-10 02:07 UTC] hosting at indiannic dot com
further information

the php.ini path configured in the windows registry

here is the php info file for each website

php version 5.2.5
using php-cgi.exe

php version 4.3.10
using php.exe
 [2008-02-10 05:19 UTC]
User error.  precision .ini setting is hosed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 07:01:28 2024 UTC