On 4 Mar 2014, at 10:33am, Donald Shepherd <[email protected]> wrote:
> It's a nice idea but that's just some sample values generated by an > emulator. I've compromised and am using round() to limit it to a few > digits after the decimal when doing the comparison. If you're using randomly generated floating point numbers, and they're apparently not comparing properly, then these two things are about equally probable: (A) the comparison does not work properly for numbers which are close together (B) the strings of text which represent the numbers are incorrect Think about how you display a number as decimal: you normally do it using a lot of multiplying by ten, then subtraction of an integer from a floating point value. Multiplying a floating point number by an integer then subtracting an integer from the result is just as likely to be inaccurate as a comparison of two floating point numbers. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

