Re: [sqlite] Storing monetary values and calculations

2007-08-30 Thread John Stanton
This is not available as publicly distributed, but there is some code in http://www.viacognis.com/declib which you are free to use. RohitPatel wrote: Hi John If sourcecode for that type (DECIMAL) is available for public, please let us know the link and we can explore it for SQLite.

Re: [sqlite] Storing monetary values and calculations

2007-08-30 Thread RohitPatel9999
Hi John If sourcecode for that type (DECIMAL) is available for public, please let us know the link and we can explore it for SQLite. Thanks John Stanton wrote: > > That is an interesting way to store money. We developed a fixed point > arithmetic library of arbitrary precision using the

Re: [sqlite] Storing monetary values and calculations

2007-08-26 Thread John Stanton
That is an interesting way to store money. We developed a fixed point arithmetic library of arbitrary precision using the algorithms described by Knuth in his semi-numerical algorithms volume and using standard DECIMAL(n,m) definition. Rounding is precise using an algorithm which does not

Re: [sqlite] Storing monetary values and calculations

2007-08-26 Thread RohitPatel9999
While doing currency math, a useful money class at following link, may be used as a a reference. http://www.di-mare.com/adolfo/p/money.htm Yet Another C++ Money Class (by Adolfo Di Mare), The C Users Journal, Vol.10 No.4, pp [58-64], April 1992 Rohit. -- View this message in context:

Re: [sqlite] Storing monetary values and calculations

2007-08-14 Thread Joe Wilson
--- Mikey C <[EMAIL PROTECTED]> wrote: > John Stanton wrote: > > We have > > added a DECIMAL type to Sqlite. This stores fixed point numbers in > > ASCII display format and performs accurate artithmetic and presents > > nicely from HTML. > > In which release was the DECIMAL affinity added to

Re: [sqlite] Storing monetary values and calculations

2007-08-14 Thread Mikey C
John Stanton wrote: > > We have > added a DECIMAL type to Sqlite. This stores fixed point numbers in > ASCII display format and performs accurate artithmetic and presents > nicely from HTML. > In which release was the DECIMAL affinity added to SQLite? Can you specify the precision and

Re: [sqlite] Storing monetary values and calculations

2007-08-13 Thread John Stanton
If you store money as an integer with an "implied decimal point" (a familiar method for old-time COBOL programmers) it will work. We have added a DECIMAL type to Sqlite. This stores fixed point numbers in ASCII display format and performs accurate artithmetic and presents nicely from HTML.

[sqlite] Storing monetary values and calculations

2007-08-13 Thread Mikey C
Hi there, Currently I am using a SQLite 3.x database that stores and calculates currency values using the column type NUMERIC (which I believe has a FLOAT affinity). However this leads to errors in storing values values in floating point representation. I guess there is no planned support for