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

Re: pack 64 bit int ?

by jsprat (Curate)
on Apr 30, 2002 at 17:52 UTC ( #163137=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub pack64bit {
        my $i = new Math::BigInt shift();
        my $j = new Math::BigInt $i->brsft(32);
        my $k = $i - $j->blsft(32);
        return pack('NN', $j, $k);
    }
    
  2. or download this
     
    sub pack_bv{
      use Bit::Vector;
      my $vec = Bit::Vector->new_Dec(64, shift);
      return pack 'NN', $vec->Chunk_Read(32, 32), $vec->Chunk_Read(32, 0);
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2021-04-16 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?