Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: (tye)Re: pack 64 bit int ?

by frankied (Beadle)
on May 01, 2002 at 21:05 UTC ( #163389=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     my ($int1,$int2)=unpack('NN',shift());
        my $sign=($int1&0x80000000);
    ...
        $i*=2**32;
        $i+=$int2;
        $i=-$i if $sign;
    
  2. or download this
    my $i=new Math::BigInt shift();
    my($int1,$int2)=do {
    ...
      }
    };
    pack('NN',$int1,$int2);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://163389]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2021-02-27 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?