Bignum arithmetic

Sean Hinde sean.hinde@REDACTED
Mon May 19 16:45:07 CEST 2003

On Monday, May 19, 2003, at 03:11 PM, Pierpaolo BERNARDI wrote:

> 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^12920652458263705111179368137496632825464920630924320894917832766446 
>> 46
>> 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.

Aha! Any pointers on how to do this?


More information about the erlang-questions mailing list