Returns a Boolean value indicating whether this instance is equal to the given value.
- Xcode 8.0+
- Swift Standard Library
The value to compare with this value.
other has the same value as this instance; otherwise,
false. If either this value or
other is NaN, the result of this method is
This method serves as the basis for the equal-to operator (
==) for floating-point values. When comparing two values with this method,
-0 is equal to
+0. NaN is not equal to any value, including itself. For example:
is method implements the equality predicate defined by the IEEE 754 specification.