On 8 Mar 2013, at 6:24pm, Israel Lins Albuquerque <israelin...@yahoo.com.br> 
wrote:

> I don't know how postgres handle this, may be I can check

Postgres has special datatypes used especially to handle problems like this.  
It has both artbitrary precision and monetary datatypes.  If you present your 
problem to postgres and let it use floating point numbers it has the same 
problem SQLite has.

However, I used to work with banks and other financial institutions for a 
living and I can assure you that the systems I wrote and used used integer 
datatypes to handle amounts of money.  For historical reasons they do sometimes 
multiply by 10,000 instead of 100, but either way all amounts of money are 
stored as integers.  This speeds up calculations, reduces storage space, and 
reduces the complexity of testing required.

Just to underline what Richard wrote, this is not a bug in the way SQLite 
handles floating point.  The bug is in thinking you can express decimal 
fractions as binary floating point numbers and it is very familiar to computer 
scientists.

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

Reply via email to