tag:blogger.com,1999:blog-15758573.post1773657898753920562..comments2023-11-03T10:15:55.638+02:00Comments on Why not? (Ilan Assayag's blog): Why Double.IsNaNIlan Assayaghttp://www.blogger.com/profile/05885131038068500210noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-15758573.post-21393372627974130312007-12-17T05:26:00.000+02:002007-12-17T05:26:00.000+02:00In IEEE 754 arithmetic, NaN comparison always resu...In IEEE 754 arithmetic, NaN comparison always results in false with another number, except with !=, which is always true. IEEE arithmetic is used by most modern floating point implementations.<BR/><BR/>Its purpose is to provide a singular value outside of the affinely extended real numbers, perhaps to signal conditions such as "There is no number here" or "I don't care what its value is."<BR/><BR/>It is possible to check for a NaN directly by using the properties above, but IsNaN more clear and less error-prone. It mirrors C99's isnan(), which has additional advantages that do not apply here.Unknownhttps://www.blogger.com/profile/03604595795751274449noreply@blogger.com