Re: [perl #56608] Math::BigInt gives completely when Math::BigInt::GMP is used
by Bram other posts by this author
Jul 5 2008 1:31AM messages near this date
[perl #56608] Math::BigInt gives completely when Math::BigInt::GMP is used
|
Re: [perl #56608] Math::BigInt gives completely when Math::BigInt::GMP is used
Citeren Marc Lehmann <perlbug-followup@[...].org> :
> -----------------------------------------------------------------
> [Please enter your report here]
>
> When Math::BigInt uses GMP as backend, it gives completely bogus results:
>
> perl -MMath::BigInt=lib,GMP -e 'my $b = 0xc0010203; my $m =
> Math::BigInt->new (2) ** 24 - 1; warn $m + $b'
> -105689855 at -e line 1.
>
> perl -MMath::BigInt=lib,GMP -e 'my $b = 0xc0010203; my $m =
> Math::BigInt->new (2) ** 32 - 1; warn $m + $b'
> 3221291522 at -e line 1.
>
> This only seems to happen with 32-bit perls.
>
> [Please do not change anything below this line]
> -----------------------------------------------------------------
Can you run:
perl -MMath::BigInt=lib,GMP -Mbignum=version
Kind regards,
Bram
Thread:
Marc Lehmann
Bram
Matt Kraai
Tels
Tels
|