Math-BigInt - Problem with BinInt->new() and Hex Values

Posted on Thu May 11 17:00:34 2006 by cmv
Problem with BinInt->new() and Hex Values
Folks-
I'm just learning to use Math::BigInt, and am seeing a problem. Please tell me what I'm doing wrong.
The following works fine:
my $bt = Math::BigInt->new(0x0000000dbbec12cf); print "bt=$bt\n";
However, this doesn't work at all:
my $hex = "0x0000000dbbec12cf"; my $bt = Math::BigInt->new($hex); print "bt=$bt\n";
I get "Nan" for this second case. Any ideas?
Thanks
-Craig
Direct Responses: 2299 | Write a response