ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved