IIRC values NaN , PositiveInfinity and NegativeInfinity are not supported by SQL Server. You can verify this using the Double.IsNaN (...) and Double.IsInfinity (...) methods.
Do not use == to check, because these special values โโare never equal to any other value, not even themselves (for example, NaN != NaN ).
Ruben source share