Author mark.dickinson
Recipients mark.dickinson, skrah
Date 2009-11-09.11:31:36
SpamBayes Score 1.7516e-08
Marked as misclassified No
Message-id <>
Just to confirm the above:

In 2.6, PyFloat_FromString in Objects/floatobject.c ends up using the
system strtod to parse "nan" and "-nan" (except that if the system
strtod fails to recognise "nan" for some reason then it returns the
result of 0.0 * Infinity instead, and in that case disregards the sign).
 In 2.7 and 3.x, it ends up calling _Py_parse_inf_or_nan in
Python/pystrtod.c, and this returns 0.0 * Infinity for "nan" and -(0.0 *
Infinity) for "-nan".  And depending on compiler flags, 0.0 * Infinity
ends up being either +nan (this usually seems to happen when
optimization is on, so that the compiler itself evaluates 0.0 *
Infinity), or -nan (which happens when there's no optimization and the
FPU ends up doing the 0.0 * Infinity multiplication at runtime.) This
should explain the results you're seeing.
Date User Action Args
2009-11-09 11:31:38mark.dickinsonsetrecipients: + mark.dickinson, skrah
2009-11-09 11:31:38mark.dickinsonsetmessageid: <>
2009-11-09 11:31:37mark.dickinsonlinkissue7281 messages
2009-11-09 11:31:37mark.dickinsoncreate