[Python-Dev] VAX NaN evaluations (original) (raw)
Mark Janssen dreamingforward at gmail.com
Mon Nov 4 23:02:45 CET 2013
- Previous message: [Python-Dev] VAX NaN evaluations
- Next message: [Python-Dev] VAX NaN evaluations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 testcomplex.py, testcomplexargs.py, testfloat.py and testmath.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 _doubleu infinity = { { 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };) or something else equally rare.
I think you are asking for trouble here. As VAX floating point does not appear to have hardware support for NaN, attempts to "emulate" such could be potentially dangerous. If such software were running life-support systems, for example, your decision to emulate it would put you at fault for criminal negligence, whereas a failure simply due to lack of implementation would be more benign incompetence. Probably better for an exception to be thrown or other hard error.
Mark
- Previous message: [Python-Dev] VAX NaN evaluations
- Next message: [Python-Dev] VAX NaN evaluations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]