Float.FloatToFloat16(Single) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
{
[Android.Runtime.Register("floatToFloat16", "(F)S", "", ApiSince=36)]
public static short FloatToFloat16(float f);
[<Android.Runtime.Register("floatToFloat16", "(F)S", "", ApiSince=36)>]
static member FloatToFloat16 : single -> int16
パラメーター
- f
- Single
binary16 に変換する float 値
返品
引数に最も近い shortでエンコードされた浮動小数点 binary16 値} 変換は、java.math.RoundingMode#HALF_EVENで計算され、最も近い偶数丸めモードに丸めます。
Special cases:
<ul>
<li> If the argument is zero, the result is a zero with the
same sign as the argument.
<li> If the argument is infinite, the result is an infinity
with the same sign as the argument.
<li> If the argument is a NaN, the result is a NaN.
</ul>
The binary16 format is discussed in
more detail in the <code data-dev-comment-type="c">#float16ToFloat</code> method.
- 属性
注釈
{
20 で追加されました。
このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。