Monday, November 04, 2019, 8:41:48 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) This is almost certainly because (according to https://www.h-schmidt.net/FloatConverter/IEEE754.html) the number "1.15" cannot be expressed exactly in floating-point; the nearest expressible number being 1.14999997615814208984375, and presumably it is the floating-point representation that is being rounded, not the "string" representation. Graham _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users