Bignum arithmetic

Sean Hinde sean.hinde@REDACTED
Mon May 19 17:23:44 CEST 2003


On Monday, May 19, 2003, at 03:45 PM, Sean Hinde wrote:

>
> 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^1292065245826370511117936813749663282546492063092432089491783276644 
>>> 646
>>> 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?

OK, OK, I get it. Suddenly there is some more work to do..

Sean





More information about the erlang-questions mailing list