[Python-Dev] VAX NaN evaluations
John Klos
john at ziaspace.com
Mon Nov 4 21:47:53 CET 2013
Hi,
The nice Python folks who were at SCALE in Los Angeles last year gave me a
Python t-shirt for showing Python working on m68k and for suggesting that
I'd get it working on VAX. With libffi support for VAX from Miod Vallat,
this is now possible.
However, when compiling Python, it seems that attempts to evaluate NaN are
made in test_complex.py, test_complex_args.py, test_float.py and
test_math.py (at least in 2.7.5 - I'm working on compiling 3.3.2 now).
The short answer is to skip those tests on VAXen. The better answer is to
patch any isnan functions to always return false on VAXen and patch any
code which tries to parse, for instance, float("NaN") to use something
uncommon, such as the largest representable number (const union __double_u
__infinity = { { 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };) or
something else equally rare. While code which depends on the ability to
evaluate NaNs in some meaninful way will likely break on VAXen, I think
this is better than raising an exception.
Being completely new to Python, I'm not sure what's best to do here. What
would be the best way to find code which handles evaluation of "NaN"? Does
anyone have any recommendations?
Thanks,
John Klos
More information about the Python-Dev
mailing list