|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-09-06 20:10 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 05:00:01 2025 UTC |
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