in reply to Math With Big Numbers
C:\>perl -MMath::BigInt -le "push @ans, 6**25; push @ans, Math::BigInt +->new(6)**25; push @ans, 6**Math::BigInt->new(25); push @ans, Math::B +igInt->new(6)**Math::BigInt->new(25); print for @ans" 2.84302880299297e+019 28430288029929701376 28430288029929701376 28430288029929701376
As ++tybalt89 pointed out, you need to convert before you do the exponentiation. But you don't actually have to convert both -- you can convert either the base or the exponent or both, and the BigInt math will work correctly
|
|---|