CC: | arudd [...] t-online.de |
Subject: | [cpan-questions #36236] Fwd: Bug with BigInt? |
Date: | Fri, 01 May 2020 08:36:32 -0400 |
To: | bug-Math-BigInt [...] rt.cpan.org |
From: | cpan-questions [...] bestpractical.com |
Forwarding to the Math::BigInt bug queue.
Subject: | Bug with BigInt? |
Date: | Fri, 1 May 2020 09:59:59 +0200 |
To: | "rt-cpan-admin [...] bestpractical.com" <rt-cpan-admin [...] bestpractical.com> |
From: | "Anthony Rudd" <arudd [...] t-online.de> |
Hi
There seems to be a bug with BigInt, or am I doing something wrong?
Thanks
Tony
The relevant code:
use Math::BigInt;
Math::BigInt->accuracy(40);
$it = Math::BigInt->new(0);
$rem = Math::BigInt->new(0);
$it = $t;
$rem = $it%97;
$n = length($it);
print "it $n $it\n";
print "rem $rem\n";
The log:
it 24 100100100987654321131400
rem 66
The remainder should be 69:
Sent from Mail for Windows 10