[issue21167] float('nan') returns 0.0 on Python compiled with icc

Mark Dickinson report at bugs.python.org
Tue Aug 11 21:04:06 CEST 2015


Mark Dickinson added the comment:

Looks fine to me.  IIRC, we moved the PyFloat_FromString implementation away from using Py_NAN in Python 3 for exactly this reason.

On this point, though:

> An aggressively optimizing compiler could treat 0 * x = 0 no matter what x is.

Wouldn't such a compiler be in violation of the C standard, at least if it defines __STDC_IEC_559__?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21167>
_______________________________________


More information about the Python-bugs-list mailing list