Bug #68703 [Opn->Fbk]: bug in action for big numbers
| From: | ab@php.net | Date: | Wed, 31 Dec 2014 22:01:42 +0000 |
| Subject: | Bug #68703 [Opn->Fbk]: bug in action for big numbers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189571@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68703&edit=1
ID: 68703
Updated by: ab@php.net
Reported by: andkos11 at gmail dot com
Summary: bug in action for big numbers
-Status: Open
+Status: Feedback
Type: Bug
Package: BC math related
Operating System: Windows
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
The script you supply isn't a self enclosed repro case. Thanks.
Previous Comments:
------------------------------------------------------------------------
[2014-12-31 01:10:42] andkos11 at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=68703&edit=1