Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Convert big number from decimal to hexadecimal

by ambrus (Abbot)
on Jul 13, 2010 at 13:55 UTC ( #849270=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #include "EXTERN.h"
    #include "perl.h"
    ...
            mpz_clear(big);
            Safefree(out);
    
  2. or download this
    package Math::Tohex;
    
    ...
    
    1;
    __END__
    
  3. or download this
    use ExtUtils::MakeMaker;
    
    ...
        VERSION_FROM => "lib/Math/Tohex.pm",
        LIBS => ["-lgmp"],
    );
    
  4. or download this
    perl Makefile.PL && make
    
  5. or download this
    perl -wE 'use Math::BigInt; say Math::BigInt->new("4335043554366887798
    +866555766")->as_hex;'
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (16)
As of 2015-07-30 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls