in reply to Re: bin2dec for big numbers (use Math::BaseCalc)
in thread bin2dec for big numbers

I looked into Math::BaseCalc, and I might be missing something, but it doesn't look to answer my requirements.

It seems that Math::BaseCalc is also limited in the size of numbers it can handle. Try giving a very long string to it, say 200 binary digits. It returns results in scientific notation (...e+...), and those of course are far from being precise. It's probably limited to 32 or 64 bits (depends on what Perl's int is)

My bin2dec, OTOH, always returns an exact decimal number.

So, am I missing something ?

  • Comment on Re^2: bin2dec for big numbers (use Math::BaseCalc)