Instance Property インスタンスプロパティ

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: Fの浮動小数点値xの規模は、以下の公式を使って計算されることができます、そこで**は冪演算です:


let magnitude = 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. 次の例において、y21.5の値を持ちます、それは1.34375 * 2 ** 4のようにエンコードされます。yの仮数はしたがって1.34375です。


let y: Double = 21.5
// y.significand == 1.34375
// y.exponent == 4
// Double.radix == 2

If 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: ある型のもつ基数が2であるならば、そのとき有限の非ゼロの数に対して、仮数は範囲1.0 ..< 2.0の中になります。別の値xに対して、x.significandは次のように定義されます:

  • If x is zero, then x.significand is 0.0. xがゼロならば、そのときx.significandは0.0です。

  • If x is infinite, then x.significand is infinity. xが無限ならば、そのときx.significandは無限大です。

  • If x is NaN, then x.significand is NaN. xがNaNならば、そのときx.significandはNaNです。

Relationships 関係

From Protocol 由来プロトコル

See Also 参照

Querying a Float Floatに問い合わせる