On 4 Nov 2019, at 8:41am, Adrian Sherwin <sherwia+sql...@gmail.com> wrote:
> The simplest example I have found with x=1 is: > "select round(1.15,1)" > Result: "1.1" (should be 1.2) SQL1992 4.4.1 Characteristics of numbers: " An approximation obtained by truncation or rounding of a numerical value N for an <approximate numeric type> T is a value V repre- sentable in T such that there is no numerical value representable in T and distinct from that of V that lies between the numerical value of V and N, inclusive. If there are more than one such values V then it is implementation- defined which one is taken. It is implementation-defined which numerical values have approximations obtained by rounding or trun- cation for a given approximate numeric type. " In other words, if you're exactly on the half you can round either way. SQL is a database management system, not a presentation layer. If you're reformatting data to present it to a human, do it in your favourite programming language/library, not in a DBMS. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users