I found that saving doubles to a SQLServer database via pymssql resulted in a
loss of precision. Specifically, if i retrieve a double after saving it, it
only matches up to around 8 digits (which is approximately what you can expect
from single precision, instead of double precision).
I also found that doubles were translated to strings using str instead of repr.
Python only guarantees that float(repr(x)) == x, not that float(str(x)) == x.
I created a fork of this project that includes two changes related to
precision. The fork is http://code.google.com/r/dieterv77-pymssql/
and the commit is 4c3e2271dd7e.
There is also a unrelated, minor speed improvement in commit bd9a2213b632.
Thanks very much
Original issue reported on code.google.com by dieterv77 on 29 Dec 2011 at 2:43
Original issue reported on code.google.com by
dieterv77
on 29 Dec 2011 at 2:43