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

# FloatingPoint Implementations

## Topics

### Operators

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

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

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

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

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

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

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

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

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

Calculates the additive inverse of a value.

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

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

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

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

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

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

[`static func > (Self, Self) -> Bool`](/documentation/Swift/Float16/_(_:_:)-9d93b)

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

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/Float16/_=(_:_:)-1s8n2)

[`static func <= (Self, Self) -> Bool`](/documentation/Swift/Float16/_=(_:_:)-4bq0a)

### Initializers

[`init(Int)`](/documentation/Swift/Float16/init(_:)-4iaoz)

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

[`init<Source>(Source)`](/documentation/Swift/Float16/init(_:)-67cee)

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

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

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

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

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

[`init(signOf: Float16, magnitudeOf: Float16)`](/documentation/Swift/Float16/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/Float16/init(signOf:magnitudeOf:)-1oylh)

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

### Instance Properties

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

The exponent of the floating-point value.

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

The classification of this value.

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

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

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

A Boolean value indicating whether this instance is finite.

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

A Boolean value indicating whether the instance is infinite.

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

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

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

A Boolean value indicating whether this instance is normal.

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

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

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

A Boolean value indicating whether the instance is subnormal.

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

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

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

The greatest representable value that compares less than this value.

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

The least representable value that compares greater than this value.

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

The sign of the floating-point value.

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

The significand of the floating-point value.

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

The unit in the last place of this value.

### Instance Methods

[`func addProduct(Float16, Float16)`](/documentation/Swift/Float16/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/Float16/addingProduct(_:_:))

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

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

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

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

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

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

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

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

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

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

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

[`func isLessThanOrEqualTo(Float16) -> Bool`](/documentation/Swift/Float16/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/Float16/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/Float16/negate())

Replaces this value with its additive inverse.

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

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

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

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

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

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

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

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

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

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

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

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

### Type Aliases

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

A type that can represent any written exponent.

### Type Properties

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

The greatest finite number representable by this type.

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

Positive infinity.

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

The least positive number.

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

The least positive normal number.

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

A quiet NaN (“not a number”).

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

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

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

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

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

A signaling NaN (“not a number”).

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

The unit in the last place of 1.0.

[`static var ulpOfOne: Self`](/documentation/Swift/Float16/ulpOfOne-8wr95)

The unit in the last place of 1.0.

### Type Methods

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

Returns the greater of the two given values.

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

Returns the value with greater magnitude.

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

Returns the lesser of the two given values.

[`static func minimumMagnitude(Self, Self) -> Self`](/documentation/Swift/Float16/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)