> On Nov 4, 2019, at 2:41 AM, Adrian Sherwin <sherwia+sql...@gmail.com> wrote: > > Hi, > > I would like to report the following as a bug in SQLITE: > > The SQLITE "round" function fails to round between 4.1 and 4.6% of numbers > correctly to x decimal places when held as x+1 decimal places. > > The simplest example I have found with x=1 is: > "select round(1.15,1)" > Result: "1.1" (should be 1.2)
SQLite uses the IEEE-754 floating point format for real values. In that format, the value “1.1500000…” does not exist. The closest value that can be represented is 1.14999997615814208984375 Hence, the rounding. -j _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users