<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Double/FloatingPoint-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "FloatingPoint Implementations"
}
-->

# FloatingPoint Implementations

## Topics

### Operators

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

Multiplies two values and produces their product, 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 + (Double, Double) -> Double`](/documentation/Swift/Double/+(_:_:))

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

[`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 - (Double) -> Double`](/documentation/Swift/Double/-(_:))

Calculates the additive inverse of a 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 -= (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 / (Double, Double) -> Double`](/documentation/Swift/Double/_(_:_:))

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

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

[`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.

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

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

### Initializers

[`init<Source>(Source)`](/documentation/Swift/Double/init(_:)-5blrp)

Creates a new value, rounded to the closest possible representation.

[`init(Int)`](/documentation/Swift/Double/init(_:)-84ohu)

Creates a new value, rounded to the closest possible representation.

[`init?<Source>(exactly: Source)`](/documentation/Swift/Double/init(exactly:)-2uexo)

Creates a new value, if the given integer can be represented exactly.

[`init(sign: FloatingPointSign, exponent: Int, significand: Double)`](/documentation/Swift/Double/init(sign:exponent:significand:))

Creates a new value from the given sign, exponent, and significand.

[`init(signOf: Double, magnitudeOf: Double)`](/documentation/Swift/Double/init(signOf:magnitudeOf:))

Creates a new floating-point value using the sign of one value and the
magnitude of another.

[`init(signOf: Self, magnitudeOf: Self)`](/documentation/Swift/Double/init(signOf:magnitudeOf:)-6i9uy)

Creates a new floating-point value using the sign of one value and the
magnitude of another.

### Instance Properties

[`var exponent: Int`](/documentation/Swift/Double/exponent-swift.property)

The exponent of the floating-point value.

[`var floatingPointClass: FloatingPointClassification`](/documentation/Swift/Double/floatingPointClass)

The classification of this value.

[`var isCanonical: Bool`](/documentation/Swift/Double/isCanonical)

A Boolean value indicating whether the instance’s representation is in
its canonical form.

[`var isFinite: Bool`](/documentation/Swift/Double/isFinite)

A Boolean value indicating whether this instance is finite.

[`var isInfinite: Bool`](/documentation/Swift/Double/isInfinite)

A Boolean value indicating whether the instance is infinite.

[`var isNaN: Bool`](/documentation/Swift/Double/isNaN)

A Boolean value indicating whether the instance is NaN (“not a number”).

[`var isNormal: Bool`](/documentation/Swift/Double/isNormal)

A Boolean value indicating whether this instance is normal.

[`var isSignalingNaN: Bool`](/documentation/Swift/Double/isSignalingNaN)

A Boolean value indicating whether the instance is a signaling NaN.

[`var isSubnormal: Bool`](/documentation/Swift/Double/isSubnormal)

A Boolean value indicating whether the instance is subnormal.

[`var isZero: Bool`](/documentation/Swift/Double/isZero)

A Boolean value indicating whether the instance is equal to zero.

[`var nextDown: Self`](/documentation/Swift/Double/nextDown)

The greatest representable value that compares less than this value.

[`var nextUp: Double`](/documentation/Swift/Double/nextUp)

The least representable value that compares greater than this value.

[`var sign: FloatingPointSign`](/documentation/Swift/Double/sign)

The sign of the floating-point value.

[`var significand: Double`](/documentation/Swift/Double/significand)

The significand of the floating-point value.

[`var ulp: Double`](/documentation/Swift/Double/ulp)

The unit in the last place of this value.

### Instance Methods

[`func addProduct(Double, Double)`](/documentation/Swift/Double/addProduct(_:_:))

Adds the product of the two given values to this value in place, computed
without intermediate rounding.

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

Returns the result of adding the product of the two given values to this
value, computed without intermediate rounding.

[`func formRemainder(dividingBy: Double)`](/documentation/Swift/Double/formRemainder(dividingBy:))

Replaces this value with the remainder of itself divided by the given
value.

[`func formSquareRoot()`](/documentation/Swift/Double/formSquareRoot())

Replaces this value with its square root, rounded to a representable
value.

[`func formTruncatingRemainder(dividingBy: Double)`](/documentation/Swift/Double/formTruncatingRemainder(dividingBy:))

Replaces this value with the remainder of itself divided by the given
value using truncating division.

[`func isEqual(to: Double) -> Bool`](/documentation/Swift/Double/isEqual(to:))

Returns a Boolean value indicating whether this instance is equal to the
given value.

[`func isLess(than: Double) -> Bool`](/documentation/Swift/Double/isLess(than:))

Returns a Boolean value indicating whether this instance is less than the
given value.

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

Returns a Boolean value indicating whether this instance is less than or
equal to the given value.

[`func isTotallyOrdered(belowOrEqualTo: Self) -> Bool`](/documentation/Swift/Double/isTotallyOrdered(belowOrEqualTo:))

Returns a Boolean value indicating whether this instance should precede
or tie positions with the given value in an ascending sort.

[`func negate()`](/documentation/Swift/Double/negate())

Replaces this value with its additive inverse.

[`func remainder(dividingBy: Self) -> Self`](/documentation/Swift/Double/remainder(dividingBy:))

Returns the remainder of this value divided by the given value.

[`func round()`](/documentation/Swift/Double/round())

[`func round(FloatingPointRoundingRule)`](/documentation/Swift/Double/round(_:))

Rounds the value to an integral value using the specified rounding rule.

[`func rounded() -> Self`](/documentation/Swift/Double/rounded())

[`func rounded(FloatingPointRoundingRule) -> Self`](/documentation/Swift/Double/rounded(_:))

Returns this value rounded to an integral value using the specified
rounding rule.

[`func squareRoot() -> Self`](/documentation/Swift/Double/squareRoot())

Returns the square root of the value, rounded to a representable value.

[`func truncatingRemainder(dividingBy: Self) -> Self`](/documentation/Swift/Double/truncatingRemainder(dividingBy:))

Returns the remainder of this value divided by the given value using
truncating division.

### Type Aliases

[`typealias Exponent`](/documentation/Swift/Double/Exponent-swift.typealias)

A type that can represent any written exponent.

### Type Properties

[`static var greatestFiniteMagnitude: Double`](/documentation/Swift/Double/greatestFiniteMagnitude)

The greatest finite number representable by this type.

[`static var infinity: Double`](/documentation/Swift/Double/infinity)

Positive infinity.

[`static var leastNonzeroMagnitude: Double`](/documentation/Swift/Double/leastNonzeroMagnitude)

The least positive number.

[`static var leastNormalMagnitude: Double`](/documentation/Swift/Double/leastNormalMagnitude)

The least positive normal number.

[`static var nan: Double`](/documentation/Swift/Double/nan)

A quiet NaN (“not a number”).

[`static var pi: Double`](/documentation/Swift/Double/pi)

The mathematical constant pi (π), approximately equal to 3.14159.

[`static var radix: Int`](/documentation/Swift/Double/radix)

The radix, or base of exponentiation, for a floating-point type.

[`static var signalingNaN: Double`](/documentation/Swift/Double/signalingNaN)

A signaling NaN (“not a number”).

[`static var ulpOfOne: Double`](/documentation/Swift/Double/ulpOfOne)

The unit in the last place of 1.0.

[`static var ulpOfOne: Self`](/documentation/Swift/Double/ulpOfOne-1s81x)

The unit in the last place of 1.0.

### Type Methods

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

Returns the greater of the two given values.

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

Returns the value with greater magnitude.

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

Returns the lesser of the two given values.

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

Returns the value with lesser magnitude.

---

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)