Dec-31-2023, 09:21 AM
(This post was last modified: Dec-31-2023, 09:21 AM by Gribouillis.)
(Dec-30-2023, 06:50 PM)DeaD_EyE Wrote: Due to the requirements of the IEEE-754 standard, math.nan and float('nan') are not considered to equal to any other numeric value, including themselves.
>>> float('nan') == float('nan') False >>> >>> x = float('nan') >>> x == x False >>>That's because you can never tell where a NaN value comes from, and the IEEE-754 format allows several NaN values.
« We can solve any problem by introducing an extra level of indirection »