Initializer

init(sign:exponentBitPattern:significandBitPattern:)

Creates a new instance from the specified sign and bit patterns.

Declaration

init(sign: FloatingPointSign, exponentBitPattern: UInt, significandBitPattern: UInt64)

Parameters

sign

The sign of the new value.

exponentBitPattern

The bit pattern to use for the exponent field of the new value.

significandBitPattern

The bit pattern to use for the significand field of the new value.

Discussion

The values passed as exponentBitPattern and significandBitPattern are interpreted in the binary interchange format defined by the IEEE 754 specification.

Relationships

From Protocol

See Also

Working with Binary Representation

var bitPattern: UInt64

The bit pattern of the value’s encoding.

var significandBitPattern: UInt64

The raw encoding of the value’s significand field.

var significandWidth: Int

The number of bits required to represent the value’s significand.

var exponentBitPattern: UInt

The raw encoding of the value’s exponent field.

static var significandBitCount: Int

The available number of fractional significand bits.

static var exponentBitCount: Int

The number of bits used to represent the type’s exponent.

static var radix: Int

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

init(bitPattern: UInt64)

Creates a new value with the given bit pattern.

init(nan: Double.RawSignificand, signaling: Bool)

Creates a NaN (“not a number”) value with the specified payload.

typealias Double.Exponent

A type that can represent any written exponent.

typealias Double.RawSignificand

A type that represents the encoded significand of a value.