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

From: Rafael Anschau <rafael.anschau_at_gmail.com>
Date: Fri, 9 Apr 2010 13:57:14 -0700 (PDT)
Message-ID: <8b4982cb-123a-43e0-bddb-24bcecb79b4a_at_a9g2000vbb.googlegroups.com>


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.

Actually what databases do(just checked the manual, something I should more often before engaging into discussions) is to hold only those exactly 18%.

It´s right there at:

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html Received on Fri Apr 09 2010 - 22:57:14 CEST

Original text of this message