Apr
18th | 2008

Don’t Use Double.Nan

Posted by Shahar Y |
Filed under .Net, C# |

Comparison of a double with double.Nan (Not a Number) will always return false. Even (double.Nan == double.Nan) return false and indeed, from IEEE 754 specs: equality comparison between two Nan is always false. If we want to check whether a specific double is Nan, double.IsNan() shall be used. Lets look at how the IsNan [...]


Continue Reading...

Search Dev102