From: ocracy at msn dot com Operating system: windows PHP version: 4.4.4 PHP Bug Type: *General Issues Bug description: Number of return Modular_arithmetic is negative..
Description: ------------ Number of return Modular_arithmetic must be positive in general but i tryed high nubmer like(2^30++) in Modular_arithmetic, PHP gave me negative nubmer... example: x=2^31, y=x%20, y = negative in PHP Reproduce code: --------------- <?php $number = 31; $pow = pow(2,$number); $random = rand(10,50); echo ($pow%$random); ?> Expected result: ---------------- Negative numbers.. Like -6 -38 -44 .. .. Actual result: -------------- nubmer of return will be positive.. -- Edit bug report at http://bugs.php.net/?id=39610&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39610&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39610&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39610&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39610&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39610&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39610&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39610&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39610&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39610&r=support Expected behavior: http://bugs.php.net/fix.php?id=39610&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39610&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39610&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39610&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39610&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39610&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39610&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39610&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39610&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39610&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39610&r=mysqlcfg