Tim Peters <t...@python.org> added the comment:

If someone opens a bug report with OpenBSD, or just for us to get more info, it 
could be useful to have a larger universe of troublesome tan inputs to stare 
at.  So the attached tanny.py supplies them, testing all inputs within 100 ulps 
of math.pi/2 (or change N=100 to whatever you like).

There are no failures on my 64-bit Win10 3.6.1.

The "correct" answers are computed by using mpmath.tan() set to 200 mantissa 
bits, then rounding back to 53 bits.  These all match the results from my 
dirt-dumb decimal tan() rounded back, but it's better to trust a widely-used 
package.

Of course mpmath needs to be installed ("pip install mpmath" works fine):

    http://mpmath.org/

Nothing else is needed (while mpmath will exploit gmpy if it's installed, by 
default it sticks to pure Python code).

----------
Added file: https://bugs.python.org/file47183/tanny.py

_______________________________________
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

Reply via email to