<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/floating-point-operators-for-double",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Floating-Point Operators for Double"
}
-->

# Floating-Point Operators for Double

Perform arithmetic and bitwise operations or compare values.

## Topics

### Arithmetic

[`static func + (Double, Double) -> Double`](/documentation/Swift/Double/+(_:_:))

Adds two values and produces their sum, rounded to a
representable value.

[`static func - (Double, Double) -> Double`](/documentation/Swift/Double/-(_:_:))

Subtracts one value from another and produces their difference, rounded
to a representable value.

[`static func * (Double, Double) -> Double`](/documentation/Swift/Double/*(_:_:))

Multiplies two values and produces their product, rounding to a
representable value.

[`static func / (Double, Double) -> Double`](/documentation/Swift/Double/_(_:_:))

Returns the quotient of dividing the first value by the second, rounded
to a representable value.

### Arithmetic with Assignment

[`static func += (inout Double, Double)`](/documentation/Swift/Double/+=(_:_:))

Adds two values and stores the result in the left-hand-side variable,
rounded to a representable value.

[`static func -= (inout Double, Double)`](/documentation/Swift/Double/-=(_:_:))

Subtracts the second value from the first and stores the difference in
the left-hand-side variable, rounding to a representable value.

[`static func *= (inout Double, Double)`](/documentation/Swift/Double/*=(_:_:))

Multiplies two values and stores the result in the left-hand-side
variable, rounding to a representable value.

[`static func /= (inout Double, Double)`](/documentation/Swift/Double/_=(_:_:))

Divides the first value by the second and stores the quotient in the
left-hand-side variable, rounding to a representable value.

### Comparison

[`static func == (Self, Self) -> Bool`](/documentation/Swift/Double/==(_:_:)-12hdv)

Returns a Boolean value indicating whether two values are equal.

[`static func != (borrowing Self, borrowing Self) -> Bool`](/documentation/Swift/Double/!=(_:_:))

Returns a Boolean value indicating whether two values are not equal.

### Negation

[`static func - (Double) -> Double`](/documentation/Swift/Double/-(_:))

Calculates the additive inverse of a value.

[`static func + (Self) -> Self`](/documentation/Swift/Double/+(_:))

Returns the given number unchanged.

### Range Expressions

[`static func ... (Self) -> PartialRangeThrough<Self>`](/documentation/Swift/Double/...(_:)-4mm67)

Returns a partial range up to, and including, its upper bound.

[`static func ... (Self) -> PartialRangeFrom<Self>`](/documentation/Swift/Double/...(_:)-6ct5v)

Returns a partial range extending upward from a lower bound.



---

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)