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

# Floating-Point Operators for Float

Perform arithmetic and bitwise operations or compare values.

## Topics

### Arithmetic

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

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

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

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

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

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

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

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

### Arithmetic with Assignment

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

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

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

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 Float, Float)`](/documentation/Swift/Float/*=(_:_:))

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

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

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/Float/==(_:_:)-12hdt)

Returns a Boolean value indicating whether two values are equal.

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

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

[`static func < (Self, Self) -> Bool`](/documentation/Swift/Float/_(_:_:)-7lwp7)

Returns a Boolean value indicating whether the value of the first
argument is less than that of the second argument.

[`static func <= (Self, Self) -> Bool`](/documentation/Swift/Float/_=(_:_:)-5yoz5)

[`static func > (Self, Self) -> Bool`](/documentation/Swift/Float/_(_:_:)-552jr)

[`static func >= (Self, Self) -> Bool`](/documentation/Swift/Float/_=(_:_:)-9o6ha)

### Negation

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

Calculates the additive inverse of a value.

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

Returns the given number unchanged.

### Range Expressions

[`static func ..< (Self) -> PartialRangeUpTo<Self>`](/documentation/Swift/Float/.._(_:))

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

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

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

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

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)