9public readonly
struct Half :
IComparable,
ISpanFormattable,
IFormattable,
IComparable<Half>,
IEquatable<Half>,
IBinaryFloatingPoint<Half>,
IBinaryNumber<Half>,
IBitwiseOperators<Half, Half, Half>,
INumber<Half>,
IAdditionOperators<Half, Half, Half>,
IAdditiveIdentity<Half, Half>,
IComparisonOperators<Half, Half>,
IEqualityOperators<Half, Half>,
IDecrementOperators<Half>,
IDivisionOperators<Half, Half, Half>,
IIncrementOperators<Half>,
IModulusOperators<Half, Half, Half>,
IMultiplicativeIdentity<Half, Half>,
IMultiplyOperators<Half, Half, Half>,
ISpanParseable<Half>,
IParseable<Half>,
ISubtractionOperators<Half, Half, Half>,
IUnaryNegationOperators<Half, Half>,
IUnaryPlusOperators<Half, Half>,
IFloatingPoint<Half>,
ISignedNumber<Half>,
IMinMaxValue<Half>
33 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
36 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
39 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
42 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
45 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
48 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
51 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
54 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
57 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
60 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
63 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
66 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
69 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
72 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
75 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
83 private Half(
bool sign, ushort exp, ushort sig)
85 _value = (ushort)(((sign ? 1 : 0) << 15) + (exp << 10) + sig);
139 return right <= left;
157 return !(left == right);
177 return (
short)value._value < 0;
182 return value._value == 64512;
188 if (num < 31744 && num != 0)
190 return (num & 0x7C00) != 0;
197 return value._value == 31744;
203 if (num < 31744 && num != 0)
205 return (num & 0x7C00) == 0;
258 result =
default(
Half);
274 result =
default(
Half);
277 return TryParse(
s.AsSpan(), style, provider, out result);
288 return (ushort)((left._value | right.
_value) & -32769) == 0;
293 return ((
value._value - 1) & -32769) >= 31744;
298 return (ushort)(value._value & 0xFFFF7FFFu);
339 public override bool Equals([NotNullWhen(
true)]
object?
obj)
398 bool flag = (num & 0x80000000u) >> 31 != 0;
399 int num2 = (int)(num & 0x7F800000) >> 23;
400 uint num3 = num & 0x7FFFFFu;
413 uint num4 = (num3 >> 9) | (((num3 & 0x1FFu) != 0) ? 1u : 0u);
414 if (((uint)num2 | num4) == 0)
416 return new Half(flag, 0, 0);
424 bool flag = (num & 0x8000000000000000uL) >> 63 != 0;
425 int num2 = (int)((num & 0x7FF0000000000000L) >> 52);
426 ulong num3 = num & 0xFFFFFFFFFFFFFuL;
440 if (((uint)num2 | num4) == 0)
442 return new Half(flag, 0, 0);
450 int num =
value.Exponent;
451 uint num2 =
value.Significand;
461 return float.PositiveInfinity;
463 return float.NegativeInfinity;
477 return CreateSingle(flag, (
byte)(num + 112), num2 << 13);
483 int num =
value.Exponent;
484 uint num2 =
value.Significand;
494 return double.PositiveInfinity;
496 return double.NegativeInfinity;
510 return CreateDouble(flag, (ushort)(num + 1008), (ulong)num2 << 42);
517 return new Half((ushort)(
value._value ^ 0x8000u));
525 return (
Exp: 1 - num, Sig: sig << num);
530 uint num = (uint)((sign ? 1 : 0) << 15);
531 uint num2 = (uint)(significand >> 54);
538 if ((uint)exp >= 29u)
546 else if (exp > 29 || sig + 8 >= 32768)
555 sig = (ushort)(sig + 8 >> 4);
556 sig &= (ushort)(~((((num ^ 8) == 0) ? 1u : 0u) & 1u));
561 return new Half(sign, (ushort)exp, sig)._value;
574 return (i >> dist) | ((i << -dist != 0) ? 1u : 0u);
587 return (l >> dist) | (ulong)((l << -dist != 0
L) ? 1 : 0);
592 uint num = (uint)((sign ? 1 : 0) << 31);
593 uint num2 = (uint)(significand >> 41);
599 ulong num = (ulong)((
long)(sign ? 1 : 0) << 63);
600 ulong num2 = significand >> 12;
614 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
617 return (
Half)((float)left + (
float)right);
620 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
624 uint num2 = (num >> 10) & 0x1Fu;
625 uint num3 = num & 0x3FFu;
633 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
639 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
646 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
653 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
660 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
667 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
673 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
676 return left <= right;
679 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
685 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
688 return left >= right;
691 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
694 float num = (float)
value;
699 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
702 return left == right;
705 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
708 return left != right;
711 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
714 return (
Half)((float)left / (
float)right);
717 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
723 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
729 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
735 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
741 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
747 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
753 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
759 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
763 if ((num & 0x7C00) >= 31744)
775 num += (ushort)((num >= 0) ? 1 : (-1));
779 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
783 if ((num & 0x7C00) >= 31744)
793 return new Half(32769);
795 num += (ushort)((num < 0) ? 1 : (-1));
799 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
805 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
811 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
817 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
823 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
829 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
835 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
841 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
847 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
853 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
856 return TInteger.Create(
MathF.
ILogB((
float)x));
859 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
865 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
871 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
877 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
883 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
889 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
895 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
901 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
907 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
913 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
919 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
925 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
931 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
937 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
943 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
949 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
955 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
961 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
967 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
973 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
979 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
985 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
991 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
997 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1003 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1009 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1015 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1018 float num = (float)
value;
1023 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1026 return (
Half)((float)left % (
float)right);
1029 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1032 return (
Half)((float)left * (
float)right);
1035 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1041 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1048 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1051 if (typeof(TOther) == typeof(
byte))
1055 if (typeof(TOther) == typeof(
char))
1059 if (typeof(TOther) == typeof(decimal))
1061 return (
Half)(float)(decimal)(object)
value;
1063 if (typeof(TOther) == typeof(
double))
1067 if (typeof(TOther) == typeof(
short))
1071 if (typeof(TOther) == typeof(
int))
1075 if (typeof(TOther) == typeof(
long))
1079 if (typeof(TOther) == typeof(
IntPtr))
1083 if (typeof(TOther) == typeof(sbyte))
1087 if (typeof(TOther) == typeof(
float))
1091 if (typeof(TOther) == typeof(ushort))
1093 return (
Half)(int)(ushort)(object)
value;
1095 if (typeof(TOther) == typeof(uint))
1099 if (typeof(TOther) == typeof(ulong))
1103 if (typeof(TOther) == typeof(
UIntPtr))
1108 return default(
Half);
1112 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1115 if (typeof(TOther) == typeof(
byte))
1119 if (typeof(TOther) == typeof(
char))
1123 if (typeof(TOther) == typeof(decimal))
1125 return (
Half)(float)(decimal)(object)
value;
1127 if (typeof(TOther) == typeof(
double))
1131 if (typeof(TOther) == typeof(
short))
1135 if (typeof(TOther) == typeof(
int))
1139 if (typeof(TOther) == typeof(
long))
1143 if (typeof(TOther) == typeof(
IntPtr))
1147 if (typeof(TOther) == typeof(sbyte))
1151 if (typeof(TOther) == typeof(
float))
1155 if (typeof(TOther) == typeof(ushort))
1157 return (
Half)(int)(ushort)(object)
value;
1159 if (typeof(TOther) == typeof(uint))
1163 if (typeof(TOther) == typeof(ulong))
1167 if (typeof(TOther) == typeof(
UIntPtr))
1172 return default(
Half);
1176 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1179 if (typeof(TOther) == typeof(
byte))
1183 if (typeof(TOther) == typeof(
char))
1187 if (typeof(TOther) == typeof(decimal))
1189 return (
Half)(float)(decimal)(object)
value;
1191 if (typeof(TOther) == typeof(
double))
1195 if (typeof(TOther) == typeof(
short))
1199 if (typeof(TOther) == typeof(
int))
1203 if (typeof(TOther) == typeof(
long))
1207 if (typeof(TOther) == typeof(
IntPtr))
1211 if (typeof(TOther) == typeof(sbyte))
1215 if (typeof(TOther) == typeof(
float))
1219 if (typeof(TOther) == typeof(ushort))
1221 return (
Half)(int)(ushort)(object)
value;
1223 if (typeof(TOther) == typeof(uint))
1227 if (typeof(TOther) == typeof(ulong))
1231 if (typeof(TOther) == typeof(
UIntPtr))
1236 return default(
Half);
1239 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1242 return (
Quotient: (
Half)((
float)left / (float)right), Remainder: (
Half)((
float)left % (float)right));
1245 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1251 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1257 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1260 return Parse(
s, style, provider);
1263 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1266 return Parse(
s, style, provider);
1269 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1276 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1279 if (typeof(TOther) == typeof(
byte))
1281 result = (
Half)(
int)(byte)(
object)
value;
1284 if (typeof(TOther) == typeof(
char))
1286 result = (
Half)(
int)(char)(
object)
value;
1289 if (typeof(TOther) == typeof(decimal))
1291 result = (
Half)(
float)(decimal)(
object)
value;
1294 if (typeof(TOther) == typeof(
double))
1299 if (typeof(TOther) == typeof(
short))
1304 if (typeof(TOther) == typeof(
int))
1309 if (typeof(TOther) == typeof(
long))
1314 if (typeof(TOther) == typeof(
IntPtr))
1319 if (typeof(TOther) == typeof(sbyte))
1324 if (typeof(TOther) == typeof(
float))
1329 if (typeof(TOther) == typeof(ushort))
1331 result = (
Half)(
int)(ushort)(
object)
value;
1334 if (typeof(TOther) == typeof(uint))
1339 if (typeof(TOther) == typeof(ulong))
1344 if (typeof(TOther) == typeof(
UIntPtr))
1350 result =
default(
Half);
1354 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1357 return TryParse(
s, style, provider, out result);
1360 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1363 return TryParse(
s, style, provider, out result);
1366 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1369 return Parse(
s, provider);
1372 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1378 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1384 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1390 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1393 return (
Half)((float)left - (
float)right);
1396 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
1402 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
static Half UInt16BitsToHalf(ushort value)
static ushort HalfToUInt16Bits(Half value)
static ulong DoubleToUInt64Bits(double value)
static double UInt64BitsToDouble(ulong value)
static uint SingleToUInt32Bits(float value)
static float UInt32BitsToSingle(uint value)
static float Abs(float x)
static float Log(float x)
static unsafe float Truncate(float x)
static float MinMagnitude(float x, float y)
static float ScaleB(float x, int n)
static float Log2(float x)
static float Max(float x, float y)
static float Atan(float x)
static float Acosh(float x)
static float FusedMultiplyAdd(float x, float y, float z)
static float Atan2(float y, float x)
static float Sqrt(float x)
static float MaxMagnitude(float x, float y)
static float Pow(float x, float y)
static float Min(float x, float y)
static float Log10(float x)
static float Asinh(float x)
static float Acos(float x)
static float Cos(float x)
static float Sinh(float x)
static float Asin(float x)
static float Atanh(float x)
static float Cbrt(float x)
static float Cosh(float x)
static float IEEERemainder(float x, float y)
static float CopySign(float x, float y)
static float Ceiling(float x)
static float Sin(float x)
static float Floor(float x)
static float Exp(float x)
static float Tan(float x)
static float Tanh(float x)
static int ILogB(float x)
static float Round(float x)
static byte Clamp(byte value, byte min, byte max)
static string FormatHalf(Half value, string format, NumberFormatInfo info)
static Half ParseHalf(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info)
static bool TryFormatHalf(Half value, ReadOnlySpan< char > format, NumberFormatInfo info, Span< char > destination, out int charsWritten)
static unsafe bool TryParseHalf(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info, out Half result)
static int LeadingZeroCount(uint value)
static string Arg_MustBeHalf
static void ThrowNotSupportedException(ExceptionResource resource)
static void ThrowArgumentNullException(string name)
static TResult AdditiveIdentity
static bool IsPow2(TSelf value)
static TSelf Log2(TSelf value)
static bool IsNaN(TSelf value)
static TSelf CopySign(TSelf x, TSelf y)
static bool IsPositiveInfinity(TSelf value)
static TSelf Acosh(TSelf x)
static TSelf MinMagnitude(TSelf x, TSelf y)
static TSelf Log10(TSelf x)
static TSelf Ceiling(TSelf x)
static bool IsFinite(TSelf value)
static bool IsNegativeInfinity(TSelf value)
static TSelf MaxMagnitude(TSelf x, TSelf y)
static TSelf PositiveInfinity
static TSelf IEEERemainder(TSelf left, TSelf right)
static TSelf Pow(TSelf x, TSelf y)
static TSelf Asin(TSelf x)
static TSelf Floor(TSelf x)
static TSelf Truncate(TSelf x)
static TSelf Asinh(TSelf x)
static TSelf Atanh(TSelf x)
static TSelf NegativeZero
static TSelf Log(TSelf x)
static TSelf Cbrt(TSelf x)
static TSelf BitIncrement(TSelf x)
static TSelf Tan(TSelf x)
static TSelf Sinh(TSelf x)
static bool IsInfinity(TSelf value)
static bool IsSubnormal(TSelf value)
static TSelf Tanh(TSelf x)
static TSelf Exp(TSelf x)
static bool IsNegative(TSelf value)
static TSelf Atan(TSelf x)
static TSelf Sqrt(TSelf x)
static TSelf BitDecrement(TSelf x)
static TSelf FusedMultiplyAdd(TSelf left, TSelf right, TSelf addend)
static TSelf Sin(TSelf x)
static TSelf Acos(TSelf x)
static TSelf Round(TSelf x)
static bool IsNormal(TSelf value)
static TSelf Atan2(TSelf y, TSelf x)
static TSelf Cos(TSelf x)
static TSelf Cosh(TSelf x)
static TSelf NegativeInfinity
static TSelf Log2(TSelf x)
static TResult MultiplicativeIdentity
static TSelf Max(TSelf x, TSelf y)
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out TSelf result)
static TSelf Parse(string s, NumberStyles style, IFormatProvider? provider)
static TSelf Sign(TSelf value)
static TSelf Min(TSelf x, TSelf y)
static TSelf Abs(TSelf value)
static TSelf Clamp(TSelf value, TSelf min, TSelf max)
static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out TSelf result)
static TSelf Parse(string s, IFormatProvider? provider)
static bool TryParse(ReadOnlySpan< char > s, IFormatProvider? provider, out TSelf result)
static TSelf Parse(ReadOnlySpan< char > s, IFormatProvider? provider)
static bool IsNaNOrZero(Half value)
static bool TryParse(ReadOnlySpan< char > s, out Half result)
static Half NegativeInfinity
static bool IsPositiveInfinity(Half value)
static bool IsNaN(Half value)
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out Half result)
static ushort RoundPackToHalf(bool sign, short exp, ushort sig)
static Half Parse(string s, IFormatProvider? provider)
static float CreateSingle(bool sign, byte exp, uint sig)
static Half Parse(string s)
static Half Negate(Half value)
static bool operator>=(Half left, Half right)
static readonly Half NegativeZero
bool TryFormat(Span< char > destination, out int charsWritten, ReadOnlySpan< char > format=default(ReadOnlySpan< char >), IFormatProvider? provider=null)
static Half Parse(string s, NumberStyles style)
static bool TryParse(ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider, out Half result)
static bool IsNegative(Half value)
static bool IsSubnormal(Half value)
static Half Parse(ReadOnlySpan< char > s, NumberStyles style=NumberStyles.Float|NumberStyles.AllowThousands, IFormatProvider? provider=null)
override bool Equals([NotNullWhen(true)] object? obj)
static bool operator>(Half left, Half right)
static bool operator==(Half left, Half right)
static Half IFloatingPoint< Half >. PositiveInfinity
static Half PositiveInfinity
static bool TryParse([NotNullWhen(true)] string? s, out Half result)
static readonly Half PositiveZero
override int GetHashCode()
static Half IFloatingPoint< Half >. NaN
static Half Half Remainder INumber< Half >. DivRem(Half left, Half right)
static Half IFloatingPoint< Half >. NegativeInfinity
string ToString(IFormatProvider? provider)
Half(bool sign, ushort exp, ushort sig)
static bool operator<=(Half left, Half right)
static ulong ShiftRightJam(ulong l, int dist)
static bool IsFinite(Half value)
static uint ShiftRightJam(uint i, int dist)
static bool IsNormal(Half value)
static float CreateSingleNaN(bool sign, ulong significand)
static double CreateDouble(bool sign, ushort exp, ulong sig)
string ToString(string? format)
static Half CreateHalfNaN(bool sign, ulong significand)
static Half IMinMaxValue< Half >. MinValue
int CompareTo(object? obj)
int CompareTo(Half other)
static double CreateDoubleNaN(bool sign, ulong significand)
static bool IsInfinity(Half value)
static int uint Sig NormSubnormalF16Sig(uint sig)
static Half IFloatingPoint< Half >. NegativeZero
static bool operator<(Half left, Half right)
static Half IFloatingPoint< Half >. Epsilon
static uint StripSign(Half value)
static Half IMinMaxValue< Half >. MaxValue
static Half Parse(string s, NumberStyles style=NumberStyles.Float|NumberStyles.AllowThousands, IFormatProvider? provider=null)
override string ToString()
string ToString(string? format, IFormatProvider? provider)
static bool AreZero(Half left, Half right)
static bool IsNegativeInfinity(Half value)
static bool operator!=(Half left, Half right)