#29822 [Opn->Bgs]: Modulo ( % ) return a bad result
| From: | derick@php.net | Date: | Tue, 24 Aug 2004 17:59:01 +0000 |
| Subject: | #29822 [Opn->Bgs]: Modulo ( % ) return a bad result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65184@lists.php.net to get a copy of this message | ||
ID: 29822
Updated by: derick@php.net
Reported By: simon dot vandaele at wanadoo dot fr
-Status: Open
+Status: Bogus
Bug Type: *Math Functions
Operating System: Windows Xp Family Edition
PHP Version: 5.0.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Those numbers are too large for php and they are converted to float.
And you can't do a % on floating point numbers.
Previous Comments:
------------------------------------------------------------------------
[2004-08-24 19:42:21] simon dot vandaele at wanadoo dot fr
Description:
------------
Script with problem :
<?php
$a = 1095976800000;
$b = 1072147440000;
print ($a-$b)%2551443000;
?>
It return -196919480, the correct value is 866373000.
Configure line :
cscript /nologo configure.js "--with-gd=shared"
"--enable-snapshot-build"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29822&edit=1