Bignum arithmetic

Sean Hinde sean.hinde@REDACTED
Mon May 19 16:36:47 CEST 2003


On Monday, May 19, 2003, at 02:58 PM, Joe Armstrong wrote:

> On Mon, 19 May 2003, Sean Hinde wrote:
>
>> Hi all,
>>
>> 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
>>
>> without a badarith error?
>
> Yes - buy a bigger computer - say with about 1.9 * 10^86 peta bytes of
> memory.
>
> This number is about 3.88912e+99
>
> If you store 2 digits/byte then you could store
>
> 2*10^12 digtes/tera-byte
>
>
> /Joe

Ah yes, that would be the problem then - shoulda thunk for a short  
while longer before posting ;)

I think I need to revisit my interpretation of the RFC..

Sean




More information about the erlang-questions mailing list