----- Original Message ----- From: "Alan Dickey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 29, 2003 1:32 AM Subject: Re: huge numbers
> viktoras wrote: > > > > Hi listers, > > > > I am looking for the shortest way to convert very long numbers (integers > > e.g. 9999999999999999999999999999999999999999999999999999 > > 999999999999999999999999999999999999999999999999999999999999999999 and > > longer...) to their binary representation ? > > unpack ("B*", pack("N", $number) ) produces the same string limited to > > 32 bit representation (e.g. 11111111111111111111111111111111) for all > > BIG numbers. How can I get the rest part of it ? What I am missing ? > > perldoc Math::BigInt > For something faster, use Bit::Vector - and for something faster again use Math::GMP. But so long as the numbers aren't too big, and so long as you don't have to perform large numbers of conversions, Math::BigInt should be fine. Cheers, Rob _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs