STINNER Victor <victor.stin...@gmail.com> added the comment:

Interesting info about NaN on Intel x86:

https://stackoverflow.com/questions/14021763/c-multiplication-or-addition-floats-results-nan

"The multiplication is being performed in the x87 registers, and a 
floating-point stack overflow has occurred due to (possibly unrelated) earlier 
operations in your program's execution. When the processor is in this failure 
state, all computations performed on the x87 registers produce NaN results."

--

For FreeBSD, Python main() starts with:

        /* 754 requires that FP exceptions run in "no stop" mode by default,
         * and until C vendors implement C99's ways to control FP exceptions,
         * Python requires non-stop mode.  Alas, some platforms enable FP
         * exceptions by default.  Here we disable them.
         */
#ifdef __FreeBSD__
        fedisableexcept(FE_OVERFLOW);
#endif

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32119>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to