The unit in the last place of 1.0.
Required. Default implementation provided.
- Xcode 10.0+
- Swift Standard Library
The positive difference between 1.0 and the next greater representable number.
ulp corresponds to the value represented by the C macros
DBL, etc, and is sometimes called epsilon or machine epsilon. Swift deliberately avoids using the term “epsilon” because:
Historically “epsilon” has been used to refer to several different concepts in different languages, leading to confusion and bugs.
The name “epsilon” suggests that this quantity is a good tolerance to choose for approximate comparisons, but it is almost always unsuitable for that purpose.
See also the
ulp member property.