A floating-point value. ある浮動小数点値。
minimumMagnitude(_:_:)
Availability
- macOS 10.10+
- Mac Catalyst 13.0+
- Xcode 9.0+
Technology
- Swift Standard Library Swift標準ライブラリ
Declaration 宣言
Parameters パラメータ
x
y
Another floating-point value. もう1つの浮動小数点値。
Return Value 戻り値
Whichever of x
or y
has lesser magnitude, or whichever is a number if the other is NaN.
x
とy
のどちらがより小さい規模を持つか、または他方がNaNならば数である方。
Discussion 解説
This method returns the value with lesser magnitude of the two given values, preserving order and eliminating NaN when possible. For two values x
and y
, the result of minimum
is x
if x
, y
if y
, or whichever of x
or y
is a number if the other is a quiet NaN. If both x
and y
are NaN, or either x
or y
is a signaling NaN, the result is NaN.
このメソッドは、2つの与えられた値のうちより小さい規模を持つ値を返します、可能な場合は桁数の保全およびNaNの排除をします。2つの値x
とy
に対して、minimum
の結果はx
ならばx
、y
ならばy
、または他のものがクワイエットNaNならばx
かy
どちらか数である方です。x
とy
の両方がNaN、またはx
またはy
のどちらかがシグナルNaNならば、結果はNaNです。
Double.minimumMagnitude(10.0, -25.0)
// 10.0
Double.minimumMagnitude(10.0, .nan)
// 10.0
Double.minimumMagnitude(.nan, -25.0)
// -25.0
Double.minimumMagnitude(.nan, .nan)
// nan
The minimum
method implements the min
operation defined by the IEEE 754 specification.
minimum
メソッドは、IEEE 754仕様によって定義されるmin
演算を実装します。
Note 注意
This documentation comment was inherited from Floating
.
この文書化コメントは、Floating
から引き継がれました。