significand
The significand of the floating-point value.
Declaration
var significand: Float { get }Discussion
The magnitude of a floating-point value x of type F can be calculated by using the following formula, where ** is exponentiation:
x.significand * (F.radix ** x.exponent)In the next example, y has a value of 21.5, which is encoded as 1.34375 * 2 ** 4. The significand of y is therefore 1.34375.
let y: Double = 21.5
// y.significand == 1.34375
// y.exponent == 4
// Double.radix == 2If a type’s radix is 2, then for finite nonzero numbers, the significand is in the range 1.0 ..< 2.0. For other values of x, x.significand is defined as follows:
If
xis zero, thenx.significandis 0.0.If
xis infinite, thenx.significandis infinity.If
xis NaN, thenx.significandis NaN.