Re: [sqlite] Rounding Strategy

2011-01-04 Thread Jean-Christophe Deschamps
Scott, >SQLite handles rounding by running the value through the internal >printf with the appropriate precision. As best I can tell the >internal printf adds half a unit at the appropriate position, then >truncates. Yep, truncation is a way to do it but doesn't meet layman expectations in

Re: [sqlite] Rounding Strategy

2011-01-04 Thread Jean-Christophe Deschamps
> > select round(3.05, 1) >3.0 > >Is this expected behavior for SQLite? >The documentation isn't specific on the rounding strategy that is used. > >My personal expectation was that this would round to 3.1. You _expect_ that 3.05 will represent exactly as 3.05 in IEEE, but it that the case?