A Boolean value indicating whether the instance is NaN (“not a number”).
- Xcode 8.0+
- Swift Standard Library
Because NaN is not equal to any value, including NaN, use this property instead of the equal-to operator (
==) or not-equal-to operator (
!=) to test whether a value is or is not NaN. For example:
This property is
true for both quiet and signaling NaNs.