On 17 May 2010, at 5:48pm, Jay A. Kreibich wrote: > The other options is to just use fixed-point integer values (e.g. an > integer value that is 1 cent, or 1/100th of a cent, or whatever range > you need). You need to be careful about the math, but that would be > much simpler. 64-bit integers give you a fair amount of room to play > with.
The tedium comes when you try to implement all the types of calculation. It's fast to do the four which are decimal + - * / decimal but you also have to implement decimal + - * / integer decimal + - * / real integer + - * / decimal real + - * / decimal and that's before implementing all the functions which take more than two arguments (e.g. max(), sum()). You also have to decide whether 1.333333 is meant to equal 4/3, which means reading up on how much slip to allow and trying to implement one solution which suits everyone who will want to use SQLite. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users