#20102 [NEW]: wrong value on mod (%) function
| From: | hermawan at dmonster dot com | Date: | Sat, 26 Oct 2002 08:19:18 +0000 |
| Subject: | #20102 [NEW]: wrong value on mod (%) function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-23365@lists.php.net to get a copy of this message | ||
From: hermawan@dmonster.com
Operating system: Redhat Linux 7.3
PHP version: 4.2.3
PHP Bug Type: *Math Functions
Bug description: wrong value on mod (%) function
When I try to mod some integer, it returns false value, it's different with
the calculator. Here is the example :
<?php
$int = 700000000;
$modwith = 1000000000000;
print $int%$modwith; // it return 700000000
// this is correnct.
$int = 800000000;
print $int%$modwith; // it return 72620032
// this is false, it supposed to be 800000000
?>
--
Edit bug report at http://bugs.php.net/?id=20102&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20102&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20102&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20102&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20102&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20102&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20102&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20102&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20102&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20102&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20102&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20102&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20102&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20102&r=isapi