Hi drh,

> http://www.sqlite.org/faq.html#q18

Not so easy I think (I'm well aware of rounding-problems
regarding the IEEE-Float-Formats, etc.).

Bankers rounding aside at the moment.

select round(0.95, 1) 
gives 0 - not 0.9 (in case rounding down) and
also not 1.0 (in case rounding up)

Funny thing, just tested with the example in the FAQ.
select round(9.95, 1) 
gives 0 too, not 9.9 and also not 10.0.
The wrong Zero-Output occurs also with the following:
select round(0.995, 2) 
select round(9.995, 2) 

Could someone test this with some newer SQLite-binary.
Maybe the error has something to do with my own compiler-
settings or maybe occurs on Windows only.

I'm using a "StdCall-Dll" here (3.3.17, compiled with VC8) 
under XP.

Olaf
-- 
View this message in context: 
http://www.nabble.com/error-in-round-function--tf3897765.html#a11050747
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to