BigInt: Decimal to Hex 
Author Message
 BigInt: Decimal to Hex


Quote:
> I have been unsuccessful in attempting to convert large decimal integers
> (>20 digits) to their hexadecimal equivalents.
> SCO drops core with printf("%x"), and Math::BigInt doesn't support
> conversions.  Where else might I look for big_dec2hex conversion code?

Use the module "Bit::Vector" - see my sig below for URLs where you can
find it.

Converting to/from hex and decimal is one of the modules easiest feats... :-)

Hope this helps.

I guess this module should be mentioned in the FAQs by now, but I'm
afraid it isn't...

Tom, what about including mention of this module in the FAQs, just as
the Date::Calc module is mentioned in the FAQs about date calculation
problems?

I'm tired to answer these really FREQUENTLY asked questions several
times a week...

Thanks a lot! :-)

Best regards,
--

    http://www.*-*-*.com/ ;  (Free Perl and C Software
    http://www.*-*-*.com/ ;       for Download)
    New: Build'n'Play 2.1.0 (all-purpose Unix batch installation tool)
    http://www.*-*-*.com/



Mon, 27 Aug 2001 03:00:00 GMT  
 BigInt: Decimal to Hex

Quote:
> > I have been unsuccessful in attempting to convert large decimal integers
> > (>20 digits) to their hexadecimal equivalents.
> > SCO drops core with printf("%x"), and Math::BigInt doesn't support
> > conversions.  Where else might I look for big_dec2hex conversion code?
> Use the module "Bit::Vector" - see my sig below for URLs where you can
> find it.

I forgot to mention that Bit::Vector is written in C internally and that
it uses an efficient divide-and-conquer algorithm for conversions to/from
decimal, thus it should be the fastest what you can get for this type of
conversions.

Hope this helps.

Regards,
--

    http://www.engelschall.com/u/sb/download/    (Free Perl and C Software
    http://www.perl.com/CPAN/authors/id/STBEY/         for Download)
    New: Build'n'Play 2.1.0 (all-purpose Unix batch installation tool)
    http://www.oreilly.de/catalog/perlmodger/bnp.html



Mon, 27 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BigInt: Decimal to Hex

2. BigInt: Decimal to Hex

3. decimal to hex, or binary to hex??

4. hex numbers and bigint.pl

5. BigInt.pm for HEX??

6. conversion decimal->hex number

7. *really* big hex to decimal?

8. Decimal to Hex

9. Converting a decimal number to hex

10. Hex to Decimal??

11. Decimal to Hex

12. How to converT decimal to hex????????

 

 
Powered by phpBB® Forum Software