Comment 4 for bug 882036

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : Re: rounding error

> The round issue is a python bug (not a OpenERP bug) ?! Or not ?

It's neither and both, it's an inaccuracy issue with the way floating-point numbers are stored[0], leading to a number of problems [1] [2] when trying to perform precise manipulation (including rounding) of floating-point numbers (floats and doubles). Lorenzo also nicely outlined the issues in the message he linked.

The behavior is deterministic, but that does not make it any easier to handle.

[0] http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
[1] http://docs.python.org/tutorial/floatingpoint.html
[2] http://www.lahey.com/float.htm