Tim Peters <t...@python.org> added the comment:
Jurjen, the errors you see in Python's sin() are _entirely_ due to your platform C's libm. Python just calls the platform C's sin. So nothing can be said about it in general. The better libm trig functions today do indeed perform trig argument reduction "as if" an infinite precision pi were used. In practice, even for IEEE double precision no more than a few thousand bits are ever needed in the worst case, and the better libm trig functions use something much cheaper than that for arguments in a "reasonably small" range. But, again, Python has nothing to do with that. The better libm implementations guarantee worst-case error strictly less than 1 ULP away from the infinitely precise result. But correctly rounded ("nearest-even") in all cases is still beyond what most of the better libms guarantee. ---------- stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35880> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com