The significand of the floating-point value.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Discussion
The magnitude of a floating-point value x
of type F
can be calculated by using the following formula, where **
is exponentiation:
In the next example, y
has a value of 21
, which is encoded as 1
. The significand of y
is therefore 1.34375.
If a type’s radix is 2, then for finite nonzero numbers, the significand is in the range 1
. For other values of x
, x
is defined as follows:
Note
The significand is frequently also called the mantissa, but significand is the preferred terminology in the IEEE 754 specification, to allay confusion with the use of mantissa for the fractional part of a logarithm.
If
x
is zero, thenx
is 0.0..significand If
x
is infinity, thenx
is 1.0..significand If
x
is NaN, thenx
is NaN..significand