Serhiy Storchaka added the comment: > The modulus fixes it for exact numbers. It doesn't produce exactly the same > result with floats, because of rounding. Is that a problem?
I don't think that is a problem. The function uses a number of floating point operations producing inexact intermediate values. There is not an evidence that the proposed code produces more accurate value. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26296> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com