On 2 Aug 2011, at 5:52pm, Mathias Legerer wrote:

> Thank you for clarification.

If you need numbers accurate to the 1, use integers.  Thats what they're for.  
Business applications for big businesses don't store money as floating point, 
they store it as integers.  You get more than 17 decimal digits when storing 
integers in SQLite.  That should be enough.

> And yes, you are right with the guess, that the customer wants to
> preserve that much digits

I would love to know who came up with that requirement and why.  I assume that 
the value you quoted

>> 991000004499464.0

was just for testing purposes.  That number is about 10^15.  That's a thousand 
times /more/ than there are stars in our galaxy, and there's no way to count 
those before some die and new ones are born.  There are only about a thousand 
that many grains of sand in the world, and by the time you'd counted them 
volcanoes would have fused some, and environmental shaping would have made 
others.

If you're restricting yourself to man-made items, there's only about US$100 
trillion in the entire world economy, including all currency and property owned 
by everyone everywhere from the value of my cat's fragment of sparkly tinsel 
and the gold reserve of national banks.  The number you're trying to track is 
ten times that number.  Your customer might be trying to keep track of every 
cent owned by everyone, but I doubt it.

Or perhaps your customer is a manufacturer.  A Boeing 747 has about six million 
parts, half of which are fasteners which have no function other than to attach 
two other parts together !  Add all the planes which have ever flown and all 
the cars ever manufactured together, and you still have less than 10^13 parts 
in total.  Even the biggest manufacturer doesn't need to keep track of that 
many.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to