Tim Peters <t...@python.org> added the comment: Of course the relationship is extremely delicate near pi/2. On my Windows Python 3:
>>> import math >>> (1.5707963267948961).hex() '0x1.921fb54442d16p+0' >>> math.tan(float.fromhex('0x1.921fb54442d16p+0')) # what the test expects 1978937966095219.0 >>> math.tan(float.fromhex('0x1.921fb54442d15p+0')) # input 1 ulp less 1374823386397210.2 >>> math.tan(float.fromhex('0x1.921fb54442d17p+0')) # input 1 ulp more 3530114321217157.5 Interestingly, wxMaxima on the same box reproduces the OpenBSD result: (%i1) tan(1.5707963267948961); (%o1) 1.978945885716843*10^15 But I don't know how Maxima (or OpenBSD) implement tan(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31630> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com