Exemple #1
0
 public static Half FmaFP32(Half first, Half second, Half third) =>
 (Half)((float)first * second + third);
Exemple #2
0
 public static ushort FloatAsInt(Half value) =>
 value.RawValue;
Exemple #3
0
 public static Half MulFP32(Half first, Half second) =>
 (Half)((float)first * second);
Exemple #4
0
 public static Half DivFP32(Half first, Half second) =>
 (Half)((float)first / second);
Exemple #5
0
 public static Half AddFP32(Half first, Half second) =>
 (Half)((float)first + second);
Exemple #6
0
 public static Half SubFP32(Half first, Half second) =>
 (Half)((float)first - second);
Exemple #7
0
 public static bool IsInfinity(Half half) =>
 (half.RawValue & ExponentMantissaMask) == ExponentMask;
Exemple #8
0
 public static bool IsFinite(Half half) => !IsNaN(half) & !IsInfinity(half);
Exemple #9
0
 public static bool IsPositiveInfinity(Half half) =>
 half == Half.PositiveInfinity;
Exemple #10
0
 public static bool IsNegativeInfinity(Half half) =>
 half == Half.NegativeInfinity;
Exemple #11
0
 public static bool IsZero(Half half) =>
 (half.RawValue & ExponentMantissaMask) == 0;
Exemple #12
0
 public static bool IsNaN(Half half) =>
 (half.RawValue & ExponentMantissaMask) > ExponentMask;
Exemple #13
0
 public static Half Abs(Half half) =>
 new Half((ushort)(half.RawValue & ExponentMantissaMask));
Exemple #14
0
 public static Half Neg(Half halfValue) =>
 new Half((ushort)(halfValue.RawValue ^ SignBitMask));
Exemple #15
0
 public static Half Abs(Half value) =>
 Half.Abs(value);