Subject: | $x -> bmodpow(1, 1) fails when $x is large |
Mathematically, x^1 (mod 1) is 0 for all x, but this fails in
Math::BigInt when x is large:
$ perl -MMath::BigInt -wle 'print Math::BigInt -> new("1e50") ->
bmodpow(1, 1)'
100000000000000000000000000000000000000000
This bug has been present since the bmodpow() method was introduced in
version 1.58.
I have tracked down the problem to be (yet another bug) in
Math::BigInt::Calc -> _modpow().