Bug #68703 [NEW]: bug in action for big numbers

From: Date: Wed, 31 Dec 2014 01:10:43 +0000
Subject: Bug #68703 [NEW]: bug in action for big numbers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189553@lists.php.net to get a copy of this message
From: andkos11 at gmail dot com Operating system: Windows PHP version: 5.6.4 Package: BC math related Bug Type: Bug Bug description:bug in action for big numbers Description: ------------ When tested bcpowmod, I saw that sometimes it returns wrong results, and only after this functions is twice replaced by the correct result, but this error does not occur every time so I could be a problem to observe it The number for this wrong result a = 26876030130522977362132073521581183346181374574161923861784515294359096339790317651642545453710861830, b = 77317036686803103778936280840587979061852865432165222860201467725250008729818881455247433896121539492, c = 23419441391667485230412027806848395891480806969028551095494276441653557878516815994557378094191773302 Test script: --------------- if(!empty($_GET['a']) && !empty($_GET['b']) && !empty($_GET['c'])) { echo bcpowmod($_GET['a'], $_GET['b'], $_GET['c']); } Expected result: ---------------- 7900166398097084738516054342209138549045537503223180351418154803251628881304583728795337234416935756 Actual result: -------------- 1214699235616625452989024013318099653900761106780848559004042547497269228234090040172747025.4033420042 -- Edit bug report at https://bugs.php.net/bug.php?id=68703&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68703&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68703&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68703&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68703&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68703&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68703&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68703&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68703&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68703&r=support Expected behavior: https://bugs.php.net/fix.php?id=68703&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68703&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68703&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68703&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68703&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68703&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68703&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68703&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68703&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68703&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68703&r=mysqlcfg

« previous php.bugs (#189553) next »