[tpm] Math::BigInt issue

Madison Kelly linux at alteeve.com
Sat Sep 12 10:29:59 PDT 2009

Hi all,

   Not sure if I am being daft or something, but it looks like 
Math::BigInt isn't returning a value I expected.

   I'm doing a test to make sure that 1 exbibyte (2**60) returns, as I 
manually calculated, "1152921504606846976". Instead though, I get 
"1152921504606850000". This looks like it rounded off..

   Can anyone see why then:

my $size=1;
my $bytes=Math::BigInt->new($size*(2**60));

   Rounds off?



More information about the toronto-pm mailing list