<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Double/ulpOfOne-1s81x",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SFsE8ulpOfOnexvpZ::SYNTHESIZED::s:Sd"
  },
  "title" : "ulpOfOne"
}
-->

# ulpOfOne

The unit in the last place of 1.0.

```
static var ulpOfOne: Self { get }
```

## Discussion

The positive difference between 1.0 and the next greater representable
number. `ulpOfOne` corresponds to the value represented by the C macros
`FLT_EPSILON`, `DBL_EPSILON`, 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)