Re: What´s the algorithm that compresses a 20 digit big int, into 8 bytes ?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Fri, 09 Apr 2010 11:45:36 -0300
Message-ID: <4bbf3d9a$0$26973$9a566e8b_at_news.aliant.net>


Rafael Anschau wrote:

> On Apr 8, 10:57 am, Sampo Syreeni <de..._at_iki.fi> wrote:
>
>

>>Unless my trusty old TI-86 is losing precision in embarrassing places,
>>I should also add that 64 bits doesn't quite suffice for 20 decimal
>>digits; it has 18 per cent or so of the total range, so you'd have to
>>go with 19 digits or three extra bits.
>>--
>>Sampo

>
>
> Indeed. So a few hypothesis:
>
> 1) Another algorithm is being used.
> 2) 72 bits are being used, and vendors are claiming 64 for marketing
> purposes, the justification is that 67 is closer to 64 than 72,
> notwithstanding the fact that 67 bits require full 72 bits on machines
> with a byte size of 8.
>
> There may of course be other hypothesis, thanks for bringing up this
> very interesting fact.

Does your big int support the full 20 decimal digit range, or does it merely require 20 digits to represent the extrema of the range? From your original question, I assumed the latter not the former.

If it support the full 20 decimal digit range, no algorithm will fit it into 64 bits so choosing a different algorithm will achieve nothing. Received on Fri Apr 09 2010 - 16:45:36 CEST

Original text of this message