<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sd8ulpOfOneSdvpZ"
  },
  "title" : "ulpOfOne"
}
-->

# ulpOfOne

The unit in the last place of 1.0.

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

## Discussion

The positive difference between 1.0 and the next greater representable
number. The `ulpOfOne` constant corresponds to the C macros
`FLT_EPSILON`, `DBL_EPSILON`, and others with a similar purpose.

---

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)