<!--
{
  "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/sign",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sd4signs17FloatingPointSignOvp"
  },
  "title" : "sign"
}
-->

# sign

The sign of the floating-point value.

```
var sign: FloatingPointSign { get }
```

## Discussion

The `sign` property is `.minus` if the value’s signbit is set, and
`.plus` otherwise. For example:

```
let x = -33.375
// x.sign == .minus
```

Don’t use this property to check whether a floating point value is
negative. For a value `x`, the comparison `x.sign == .minus` is not
necessarily the same as `x < 0`. In particular, `x.sign == .minus` if
`x` is -0, and while `x < 0` is always `false` if `x` is NaN, `x.sign`
could be either `.plus` or `.minus`.

---

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)