This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients mark.dickinson, r.david.murray, vstinner
Date 2022-02-04.20:57:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644008248.03.0.205451080264.issue46640@roundup.psfhosted.org>
In-reply-to
Content
Python/dtoa.c uses:

/* Standard NaN used by _Py_dg_stdnan. */

#define NAN_WORD0 0x7ff80000
#define NAN_WORD1 0

/* Return a 'standard' NaN value.

   There are exactly two quiet NaNs that don't arise by 'quieting' signaling
   NaNs (see IEEE 754-2008, section 6.2.1).  If sign == 0, return the one whose
   sign bit is cleared.  Otherwise, return the one whose sign bit is set.
*/

double
_Py_dg_stdnan(int sign)
{
    U rv;
    word0(&rv) = NAN_WORD0;
    word1(&rv) = NAN_WORD1;
    if (sign)
        word0(&rv) |= Sign_bit;
    return dval(&rv);
}
History
Date User Action Args
2022-02-04 20:57:28vstinnersetrecipients: + vstinner, mark.dickinson, r.david.murray
2022-02-04 20:57:28vstinnersetmessageid: <1644008248.03.0.205451080264.issue46640@roundup.psfhosted.org>
2022-02-04 20:57:28vstinnerlinkissue46640 messages
2022-02-04 20:57:27vstinnercreate