Problems? Is your data what you think it is? | |
PerlMonks |
Extra Long HEX to Decimal Converion Issue on Select Platformsby awohld (Hermit) |
on Jul 14, 2012 at 21:34 UTC ( [id://981858]=perlquestion: print w/replies, xml ) | Need Help?? |
awohld has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to fix where the CPAN Testers are failing the Data::MEID module. Basically when the HEX number is so big it ends up becoming negative when converted to Decimal on some platforms. I tried using Math::BigInt, but the problem still remains. For example, on some platforms, when I convert 0xA1000000 Decimal get -159383552009606898 instead of 270113177609606898. Is there a way to reliably and quickly convert large HEX numbers to Decimal on all platforms? The line of code that's converting the big HEX number to Decimal is on line 162 in MEID.pm and looks like:
Back to
Seekers of Perl Wisdom
|
|