The unit in the last place of
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
- Core Graphics
This is the unit of the least significant digit in the significand of
self. For most numbers
x, this is the difference between
x and the next greater (in magnitude) representable number. There are some edge cases to be aware of:
greatestis a finite number, even though the next greater representable value is
Finite Magnitude .ulp
xis not a finite number.
xis very small in magnitude, then
xmay be a subnormal number. On targets that do not support subnormals,
xmay be flushed to zero.
This quantity, or a related quantity is sometimes called “epsilon” or “machine epsilon”. We avoid that name because it has different meanings in different languages, which can lead to confusion, and because it suggests that it is a good tolerance to use for comparisons, which is almost never is.
(See https://en.wikipedia.org/wiki/Machine_epsilon for more detail)