public class Binary16 extends Number
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static int |
BYTES |
static int |
MAX_EXPONENT |
static int |
MIN_EXPONENT |
static short |
NaN |
static short |
NEGATIVE_INFINITY |
static short |
POSITIVE_INFINITY |
static int |
SIZE |
| コンストラクタと説明 |
|---|
Binary16(short v) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static float |
binary16BitsToFloat(short b16)
Binary16 を float に拡張するよ 1bit flag 5bit exponent 10bit fraction 非正規化数は
てきとーに正規化内に変換した
|
static short |
binary16ToRawShortBits(short v) |
static short |
binary16ToShortBits(short v)
NaN をまとめる
|
double |
doubleValue()
floatにしてからdoubleに変換.
|
boolean |
equals(Object obj)
てきとー NaNなどの扱い注意
|
static short |
FloatToBinary16bits(float val)
1 to 1 bit 符号部
sign 5 to 8 bit 指数部
10 to 23 bit 仮数部
|
float |
floatValue()
てきとーに変換.
|
int |
intValue()
float に変換してからintにする
|
boolean |
isNaN() |
static boolean |
isNaN(short value)
NaN 判定
|
long |
longValue()
floatに変換してからlongにする
|
short |
shortValue()
floatにしてからshortに変換した値.
|
static Binary16 |
valueOf(short value)
short 形式をBinary16形式にするだけ
|
public static final int BYTES
public static final int MAX_EXPONENT
public static final int MIN_EXPONENT
public static final short NaN
public static final short NEGATIVE_INFINITY
public static final short POSITIVE_INFINITY
public static final int SIZE
public float floatValue()
floatValue クラス内 Numberpublic double doubleValue()
doubleValue クラス内 Numberpublic short shortValue()
shortValue クラス内 Numberpublic static Binary16 valueOf(short value)
value - Binary16っぽい値public static float binary16BitsToFloat(short b16)
b16 - binary16 format IEEE 754public static short binary16ToShortBits(short v)
v - public static short binary16ToRawShortBits(short v)
public static short FloatToBinary16bits(float val)
val - public boolean isNaN()
public static boolean isNaN(short value)
value - 16bit列Copyright © 2024. All rights reserved.