Dr. Richard Hipp, on Friday, May 24, 2019 08:44 AM, wrote... >> Dr. Hipp, how many more scenarios, where round gives the wrong answer, >> exist? Thanks. >> > >Consider these two queries: > > SELECT round(3.255,2); > SELECT round(3.2549999999999998,2); > >Do you expect them to give different answers?
3.26 3.25 >If so, do you realize that 3.255 and 3.49999999999998 are in fact the >exact same floating point number? That number in (unambiguous) hex >notation is 0x1.a0a3d70a3d70ap+1. So how is it that you would expect >the round() function to return different answers for two cases where >it is given bit-for-bit identical inputs? How does it know which >answer to give? Hmmmm. Thanks. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users