You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% cat t
use strict;
use warnings;
use Math::GMP;
use Math::Prime::Util qw{ invmod };
my $p = Math::GMP->new(1589) ** 6;
my $q = Math::GMP->new(93) ** 6;
print "p=$p, q=$q\n";
my $i1 = invmod(-$p, $q);
print "i1=@{[ $i1 // '<undef>' ]}\n";
my $i2 = invmod(-$p % $q, $q);
print "i2=@{[ $i2 // '<undef>' ]}\n";
my $prod = (-$p * $i2) % $q;
print +($prod == 1) ? "i2 ok\n" : "i2 not ok\n";
% perl t
p=16096942149150081961, q=646990183449
i1=<undef>
i2=25493952356
i2 ok
%
I haven't looked into it yet (nor tested it against the latest github code), and it's easy enough to work around, but I assume it shouldn't be doing that - i1 should get the same answer as i2.
Hugo
The text was updated successfully, but these errors were encountered:
Hi Dana, how's the release coming along? :)
My code just hit this today under MPU-0.73:
I haven't looked into it yet (nor tested it against the latest github code), and it's easy enough to work around, but I assume it shouldn't be doing that - i1 should get the same answer as i2.
Hugo
The text was updated successfully, but these errors were encountered: