Bignum arithmetic

Pierpaolo BERNARDI bernardp@REDACTED
Mon May 19 16:11:28 CEST 2003


From: "Sean Hinde" <sean.hinde@REDACTED>

> For a bit of light relief I figured it would be fun to make an ssh
> client in Erlang. I figured that with such good bignum support it
> wouldn't be too tricky. So. has anyone any good ideas how to calculate:
>
> 2^1292065245826370511117936813749663282546492063092432089491783276644646
> 6504617309746646057975239671809

What do you mean with "calculate"?

That number, if expressed in decimal has 3.9×10^99 digits.
The universe is not big enough to contain all these digits.  8-)

Why do you think you need to calculate this number to implement ssh
(I don't know the details of ssh)?  Note that if you need to calculate
2^BigNumber mod ReasonableNumber, then there's no need to
calculate 2^BigNumber.

Cheers,
P.




More information about the erlang-questions mailing list