Re: [sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > Does C use proper IEE755 maths when you do mundane things like add two floats > together ? I assumed it compiled down to simple CPU calls which were faster > than IEE755 but not as clever with things like NaN. The vast

Re: [sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-21 Thread Igor Tandetnik
Simon Slavin wrote: > Showing my ignorance of C here. Does C use proper IEE755 maths when you do > mundane things like add two floats together ? You probably mean IEEE 754. The C standard doesn't mandate the use of IEEE 754 floating point arithmetic. The implementation may choose to implement

Re: [sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-20 Thread Simon Slavin
On 21 Dec 2009, at 6:59am, Roger Binns wrote: > Simon Slavin wrote: >> I assume one would use an existing Open C library for doing math on >> that new type of data, > > That would be considerably slower than builtin CPU instructions. You > also have the issue of type conversions - eg adding

Re: [sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-20 Thread Roger Binns
Simon Slavin wrote: > One would probably do it not by changing any existing datatype but by > introducing one or more new ones The existing double could be repurposed. This would all depend on compatibility and other stuff - ie DRH and Jacob would be far better arbiters between them of the best

Re: [sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-20 Thread Simon Slavin
On 21 Dec 2009, at 1:09am, Roger Binns wrote: > Not only do you need the type but every arithmetic operation would also need > to be updated. It will be even more fun if you also want to support the > - -1985 representations (eg normal SQLite database format) since you'll have > both semantics

Re: [sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jacob Lister wrote: > What provision is there for the inclusion of new data types in SQLite > and is such an inclusion possible or likely in future? Updating or adding a data type would affect the file format and many of the API families (eg

[sqlite] IEE754-2008 decimal32, decimal64 datatypes and SQLite

2009-12-20 Thread Jacob Lister
Hello all, Our organization is moving towards storing data values in the newly defined IEEE754-2008 decimal floating point point standard: http://en.wikipedia.org/wiki/IEEE_754-2008 What provision is there for the inclusion of new data types in SQLite and is such an inclusion possible or