Bug #63023 [Opn->Nab]: modulus problem
| From: | rasmus@php.net | Date: | Thu, 06 Sep 2012 21:22:27 +0000 |
| Subject: | Bug #63023 [Opn->Nab]: modulus problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-173221@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63023&edit=1
ID: 63023
Updated by: rasmus@php.net
Reported by: steven dot edward dot m at gmail dot com
Summary: modulus problem
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: windows
PHP Version: 5.3.16
Block user comment: N
Private report: N
New Comment:
You are overflowing your 32-bit int limit on Windows. Move to 64-bit Linux or use
bcmod(). eg.
php > echo bcmod('2166896650','1000000000');
166896650
Previous Comments:
------------------------------------------------------------------------
[2012-09-06 20:10:29] steven dot edward dot m at gmail dot com
Description:
------------
Modulus return wrong result when:
2166896650%1000000000 = -1280706462
what was the problem, is there any way to get the correct answer?
Expected result:
----------------
expected result was: 166896650
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63023&edit=1