---
title: "-(_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/float/-(_:)"
---

# -(_:)

Calculates the additive inverse of a value.

## Declaration

```swift
static func - (x: Float) -> Float
```

## Discussion

Discussion The unary minus operator (prefix -) calculates the negation of its operand. The result is always exact. let x = 21.5 let y = -x // y == -21.5
