16[
TypeForwardedFrom(
"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
17public readonly
struct Decimal :
ISpanFormattable,
IFormattable,
IComparable,
IConvertible,
IComparable<decimal>,
IEquatable<decimal>,
ISerializable,
IDeserializationCallback,
IMinMaxValue<decimal>,
ISignedNumber<decimal>,
INumber<decimal>,
IAdditionOperators<decimal, decimal, decimal>,
IAdditiveIdentity<decimal, decimal>,
IComparisonOperators<decimal, decimal>,
IEqualityOperators<decimal, decimal>,
IDecrementOperators<decimal>,
IDivisionOperators<decimal, decimal, decimal>,
IIncrementOperators<decimal>,
IModulusOperators<decimal, decimal, decimal>,
IMultiplicativeIdentity<decimal, decimal>,
IMultiplyOperators<decimal, decimal, decimal>,
ISpanParseable<decimal>,
IParseable<decimal>,
ISubtractionOperators<decimal, decimal, decimal>,
IUnaryNegationOperators<decimal, decimal>,
IUnaryPlusOperators<decimal, decimal>
24 public readonly uint
Hi;
205 private static readonly uint[]
s_powers10 =
new uint[10] { 1
u, 10
u, 100
u, 1000
u, 10000
u, 100000
u, 1000000
u, 10000000
u, 100000000
u, 1000000000
u };
209 10
uL, 100
uL, 1000
uL, 10000
uL, 100000
uL, 1000000
uL, 10000000
uL, 100000000
uL, 1000000000
uL, 10000000000
uL,
210 100000000000
uL, 1000000000000
uL, 10000000000000
uL, 100000000000000
uL, 1000000000000000
uL, 10000000000000000
uL, 100000000000000000
uL, 1000000000000000000
uL, 10000000000000000000
uL
215 1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0,
216 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0, 1000000000000000.0, 10000000000000000.0, 1
E+17, 1
E+18, 1
E+19,
217 1
E+20, 1
E+21, 1
E+22, 1
E+23, 1
E+24, 1
E+25, 1
E+26, 1
E+27, 1
E+28, 1
E+29,
218 1
E+30, 1
E+31, 1
E+32, 1
E+33, 1
E+34, 1
E+35, 1
E+36, 1
E+37, 1
E+38, 1
E+39,
219 1
E+40, 1
E+41, 1
E+42, 1
E+43, 1
E+44, 1
E+45, 1
E+46, 1
E+47, 1
E+48, 1
E+49,
220 1
E+50, 1
E+51, 1
E+52, 1
E+53, 1
E+54, 1
E+55, 1
E+56, 1
E+57, 1
E+58, 1
E+59,
221 1
E+60, 1
E+61, 1
E+62, 1
E+63, 1
E+64, 1
E+65, 1
E+66, 1
E+67, 1
E+68, 1
E+69,
222 1
E+70, 1
E+71, 1
E+72, 1
E+73, 1
E+74, 1
E+75, 1
E+76, 1
E+77, 1
E+78, 1
E+79,
292 return (
byte)(*(uint*)(&f) >> 23);
297 return (uint)(int)((ulong)(*(
long*)(&
d)) >> 52) & 0x7FF
u;
302 return (ulong)
a * (ulong)
b;
311 num += (
num2 <<= 32);
318 num += (
num2 <<= 32);
323 if (
num3 > uint.MaxValue)
452 uint num = (uint)(
high /
u);
501 return (uint)(num >> 32);
518 num = (int)(
hiRes * 32 - 64 - 1);
520 num = (num * 77 >> 8) + 1;
526 if (num < scale - 28)
540 uint
num3 = num
switch
576 while (++(*(
int*)((
byte*)
bufRes + (
long)(++
num4) * 4
L)) == 0)
606 uint num = result[
hiRes];
609 while ((
int)
num2 >= 0)
625 ulong num = 25769803776
uL + (ulong)
bufQuo.U1;
627 uint
num2 = (uint)(num - (
bufQuo.U0 = (uint)(num / 10)) * 10);
628 if (
num2 > 5 || (
num2 == 5 && (sticky || (
bufQuo.U0 & (
true ? 1
u : 0
u)) != 0)))
651 else if (
u < 4 || (
u == 4 &&
low <= 5441186219426131129
L))
715 ulong num =
d1.Low64;
720 sign ^= (
num5 & 0x80000000
u) != 0;
743 if (num > uint.MaxValue)
762 if (num <= uint.MaxValue)
775 uint
b = 1000000000
u;
784 if ((
num7 -= 9) <= 0)
808 uint
b = 1000000000
u;
819 if (
num10 > uint.MaxValue)
836 uint
b = 1000000000
u;
852 if ((uint)
num10 != 0)
989 if (
num18 >= 5 && (
num18 > 5 || (num & 1) != 0
L) && ++num == 0
L)
1006 if (
num2 <= uint.MaxValue)
1047 if ((
d2.Low64 |
d2.High) == 0
L)
1049 if ((
d1.Low64 |
d1.High) == 0
L)
1053 return (
d1._flags >> 31) | 1;
1055 if ((
d1.Low64 |
d1.High) == 0
L)
1069 int flags =
d2._flags;
1070 int num = (flags >> 31) | 1;
1071 int num2 = flags -
d1._flags;
1098 if (
num10 > uint.MaxValue)
1104 while ((
num2 -= 9) > 0);
1129 int num = (byte)(
d1.uflags +
d2.uflags >> 16);
1132 if ((
d1.High |
d1.Mid) == 0)
1135 if ((
d2.High |
d2.Mid) == 0)
1168 if (
num4 > uint.MaxValue)
1178 else if ((
d2.High |
d2.Mid) == 0)
1188 if (
num4 > uint.MaxValue)
1208 if ((
d1.High |
d2.High) != 0)
1261 if (
num6 > 2 || num > 28)
1292 int num4 = 6 - (num * 19728 >> 16);
1301 else if (
num4 != -1 ||
num3 >= 10000000.0)
1323 if (
num3 > 0.5 || (
num3 == 0.5 && (
num5 & (
true ? 1
u : 0
u)) != 0))
1417 int num4 = 14 - (num * 19728 >> 16);
1426 else if (
num4 != -1 ||
num3 >= 1000000000000000.0)
1434 if (
num3 < 100000000000000.0 &&
num4 < 28)
1486 if ((uint)
num5 == (uint)(
num9 * 100000000))
1496 if ((uint)
num5 == (uint)(
num10 * 10000))
1503 if (((
int)
num5 & 3) == 0 &&
num8 >= 2)
1513 if (((
int)
num5 & 1) == 0 &&
num8 >= 1)
1536 if (
value.IsNegative)
1545 if ((
d.Low64 |
d.High) == 0
L)
1549 uint flags = (uint)
d._flags;
1550 if ((flags & 0
xFF0000) == 0 || (
d.Low & (
true ? 1
u : 0
u)) != 0)
1554 int scale = (byte)(flags >> 16);
1556 ulong
high = ((ulong)
d.High << 32) |
d.Mid;
1558 flags = (flags & 0xFF00FFFF
u) | (uint)(scale << 16);
1559 return (
int)flags ^ (int)(
high >> 32) ^ (int)
high ^ (
int)
low;
1565 int scale = (sbyte)(
d1.uflags -
d2.uflags >> 16);
1573 if ((
d2.High |
d2.Mid) == 0)
1769 if ((
d2.ulo |
d2.umid |
d2.uhi) == 0)
1773 if ((
d1.ulo |
d1.umid |
d1.uhi) == 0)
1784 if (
d2.uflags >
d1.uflags)
1795 int num2 = (sbyte)(
d1.uflags -
d2.uflags >> 16);
1808 while ((
num2 -= 9) > 0);
1834 while (
num6 == 1000000000 &&
num2 < 0);
1843 if ((
d2.High |
d2.Mid) == 0)
1846 ulong
num8 = ((ulong)
d1.High << 32) |
d1.Mid;
1873 uint
b = ((scale <= -9) ? 1000000000
u :
s_powers10[-scale]);
1877 for (
int i = 1; i <=
num3; i++)
1944 ulong
low =
d.Low64;
1975 ulong
low2 =
d.Low64;
2009 if ((num | (
d.ulo & (
true ? 1
u : 0
u))) != 0)
2026 if ((
num5 | num) == 0 || !
d.IsNegative)
2032 if ((
num5 | num) == 0 ||
d.IsNegative)
2040 if (++
d.Low64 == 0
L)
2052 ulong num = ((ulong)
value.uhi << 32) +
value.umid;
2053 ulong
num2 = num / 1000000000;
2056 ulong
num3 = (num - (uint)((
int)
num2 * 1000000000) << 32) +
value.ulo;
2057 return (uint)(int)
num3 - (
value.ulo = (uint)(
num3 / 1000000000)) * 1000000000;
2067 public const decimal
MaxValue = 79228162514264337593543950335
m;
2069 public const decimal
MinValue = -79228162514264337593543950335
m;
2077 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2080 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2083 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2086 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2089 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2092 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2095 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
2179 _lo64 = (ulong)((uint)
info.GetInt32(
"lo") + ((long)
info.GetInt32(
"mid") << 32));
2190 info.AddValue(
"lo", (
int)
Low);
2191 info.AddValue(
"mid", (
int)
Mid);
2210 while (
num2 != 0 && num % 10 == 0
L)
2216 return new decimal((
int)num, (
int)(num >> 32), 0,
isNegative, (
byte)
num2);
2228 return (uint)(flags & 0xFF0000) <= 1835008
u;
2242 int flags = bits[3];
2245 _lo64 = (uint)bits[0] + ((ulong)(uint)bits[1] << 32);
2246 _hi32 = (uint)bits[2];
2260 _lo64 = (uint)lo + ((ulong)(uint)
mid << 32);
2281 _lo64 = (uint)lo + ((ulong)(uint)
mid << 32);
2308 int flags =
d._flags;
2309 if (((uint)flags & 0
xFF0000u) != 0)
2371 int flags =
d._flags;
2372 if (((uint)flags & 0
xFF0000u) != 0)
2452 result =
default(decimal);
2468 result =
default(decimal);
2533 return new decimal(lo,
mid,
hi, flags);
2568 return new decimal(
in d,
d._flags ^
int.MinValue);
2597 if ((uint)mode > 4
u)
2611 if ((
d.Low64 |
d.High) != 0
L)
2613 return (
d._flags >> 31) | 1;
2636 if (num != (
byte)num)
2656 if (num != (sbyte)num)
2675 if (num != (
short)num)
2690 if ((
d.High |
d.Mid) == 0)
2692 int low = (int)
d.Low;
2717 long low = (long)
d.Low64;
2750 if (num != (ushort)num)
2761 if ((
d.High |
d.Mid) == 0)
2764 if (!
d.IsNegative ||
low == 0)
2778 ulong
low =
d.Low64;
2779 if (!
d.IsNegative ||
low == 0
L)
2801 int flags =
d._flags;
2802 if (((uint)flags & 0
xFF0000u) != 0)
2810 return new decimal((uint)
value);
2816 return new decimal(
value);
2821 return new decimal(
value);
2827 return new decimal((uint)
value);
2832 return new decimal((uint)
value);
2837 return new decimal(
value);
2843 return new decimal(
value);
2848 return new decimal(
value);
2854 return new decimal(
value);
2857 public static explicit operator decimal(
float value)
2859 return new decimal(
value);
2862 public static explicit operator decimal(
double value)
2864 return new decimal(
value);
2867 public static explicit operator byte(decimal
value)
2873 public static explicit operator sbyte(decimal
value)
2878 public static explicit operator char(decimal
value)
2896 public static explicit operator ushort(decimal
value)
2901 public static explicit operator int(decimal
value)
2907 public static explicit operator uint(decimal
value)
2912 public static explicit operator long(decimal
value)
2918 public static explicit operator ulong(decimal
value)
2923 public static explicit operator float(decimal
value)
2928 public static explicit operator double(decimal
value)
2940 return new decimal(
in d,
d._flags ^
int.MinValue);
3093 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3096 return left + right;
3099 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3102 return left < right;
3105 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3108 return left <= right;
3111 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3114 return left > right;
3117 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3120 return left >= right;
3123 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3129 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3132 return left / right;
3135 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3138 return left == right;
3141 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3144 return left != right;
3147 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3153 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3156 return left % right;
3159 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3162 return left * right;
3165 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3172 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3177 return (
byte)(object)
value;
3181 return (
char)(object)
value;
3185 return (decimal)(object)
value;
3189 return (decimal)(double)(
object)
value;
3193 return (
short)(object)
value;
3197 return (
int)(object)
value;
3201 return (
long)(object)
value;
3209 return (sbyte)(object)
value;
3213 return (decimal)(float)(
object)
value;
3217 return (ushort)(object)
value;
3221 return (uint)(object)
value;
3225 return (ulong)(object)
value;
3236 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3241 return (
byte)(object)
value;
3245 return (
char)(object)
value;
3249 return (decimal)(object)
value;
3253 return (decimal)(double)(
object)
value;
3257 return (
short)(object)
value;
3261 return (
int)(object)
value;
3265 return (
long)(object)
value;
3273 return (sbyte)(object)
value;
3277 return (decimal)(float)(
object)
value;
3281 return (ushort)(object)
value;
3285 return (uint)(object)
value;
3289 return (ulong)(object)
value;
3300 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3305 return (
byte)(object)
value;
3309 return (
char)(object)
value;
3313 return (decimal)(object)
value;
3317 return (decimal)(double)(
object)
value;
3321 return (
short)(object)
value;
3325 return (
int)(object)
value;
3329 return (
long)(object)
value;
3337 return (sbyte)(object)
value;
3341 return (decimal)(float)(
object)
value;
3345 return (ushort)(object)
value;
3349 return (uint)(object)
value;
3353 return (ulong)(object)
value;
3363 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3369 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3375 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3381 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3387 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3393 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3399 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3406 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3411 result = (byte)(
object)
value;
3416 result = (char)(
object)
value;
3421 result = (decimal)(
object)
value;
3426 result = (decimal)(
double)(object)
value;
3436 result = (int)(
object)
value;
3441 result = (long)(
object)
value;
3451 result = (sbyte)(
object)
value;
3456 result = (decimal)(
float)(object)
value;
3461 result = (ushort)(
object)
value;
3466 result = (uint)(
object)
value;
3471 result = (ulong)(
object)
value;
3480 result =
default(decimal);
3484 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3490 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3496 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3502 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3508 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3514 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3520 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3523 return left - right;
3526 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
3532 [
RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
static void WriteInt32LittleEndian(Span< byte > destination, int value)
static int ReadInt32LittleEndian(ReadOnlySpan< byte > source)
static long ToInt64(object? value)
static int ToInt32(object? value)
static short ToInt16(object? value)
static byte ToByte(object? value)
static uint ToUInt32(object? value)
static ulong ToUInt64(object? value)
static ushort ToUInt16(object? value)
static sbyte ToSByte(object? value)
static bool ToBoolean([NotNullWhen(true)] object? value)
static object DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
static byte Clamp(byte value, byte min, byte max)
static byte Min(byte val1, byte val2)
static decimal Round(decimal d)
static double Abs(double value)
static int Sign(decimal value)
static byte Max(byte val1, byte val2)
static void ThrowOverflowException(TypeCode type)
static unsafe string FormatDecimal(decimal value, ReadOnlySpan< char > format, NumberFormatInfo info)
static unsafe bool TryFormatDecimal(decimal value, ReadOnlySpan< char > format, NumberFormatInfo info, Span< char > destination, out int charsWritten)
static decimal ParseDecimal(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info)
static unsafe ParsingStatus TryParseDecimal(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info, out decimal result)
static int LeadingZeroCount(uint value)
static new bool IsSupported
static string InvalidCast_FromTo
static string Overflow_Int32
static string Overflow_UInt64
static string Format(string resourceFormat, object p1)
static string Arg_DecBitCtor
static string ArgumentOutOfRange_DecimalRound
static string Overflow_Int64
static string Arg_MustBeDecimal
static string Overflow_Currency
static string Overflow_Char
static string Overflow_Decimal
static string Argument_InvalidEnumValue
static string Overflow_UInt32
static string ArgumentOutOfRange_DecimalScale
static void ThrowNotSupportedException(ExceptionResource resource)
static void ThrowArgumentNullException(string name)
static void ThrowArgumentException_DestinationTooShort()
static TResult AdditiveIdentity
short ToInt16(IFormatProvider? provider)
char ToChar(IFormatProvider? provider)
byte ToByte(IFormatProvider? provider)
decimal ToDecimal(IFormatProvider? provider)
object ToType(Type conversionType, IFormatProvider? provider)
uint ToUInt32(IFormatProvider? provider)
DateTime ToDateTime(IFormatProvider? provider)
int ToInt32(IFormatProvider? provider)
long ToInt64(IFormatProvider? provider)
ushort ToUInt16(IFormatProvider? provider)
double ToDouble(IFormatProvider? provider)
float ToSingle(IFormatProvider? provider)
sbyte ToSByte(IFormatProvider? provider)
ulong ToUInt64(IFormatProvider? provider)
bool ToBoolean(IFormatProvider? provider)
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)
void OnDeserialization(object? sender)
void GetObjectData(SerializationInfo info, StreamingContext context)
PowerOvfl(uint hi, uint mid, uint lo)
static unsafe void VarDecDiv(ref DecCalc d1, ref DecCalc d2)
static void UInt64x64To128(ulong a, ulong b, ref DecCalc result)
static unsafe int ScaleResult(Buf24 *bufRes, uint hiRes, int scale)
static uint Div96By64(ref Buf12 bufNum, ulong den)
static void VarDecMod(ref DecCalc d1, ref DecCalc d2)
static float VarR4FromDec(in decimal value)
static int GetHashCode(in decimal d)
static unsafe uint GetExponent(double d)
static readonly uint[] s_powers10
static int SearchScale(ref Buf12 bufQuo, int scale)
static uint Div128By96(ref Buf16 bufNum, ref Buf12 bufDen)
static void VarDecFromR4(float input, out DecCalc result)
static uint IncreaseScale(ref Buf12 bufNum, uint power)
static unsafe void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign)
static unsafe void VarDecModFull(ref DecCalc d1, ref DecCalc d2, int scale)
static unsafe uint DivByConst(uint *result, uint hiRes, out uint quotient, out uint remainder, uint power)
static void IncreaseScale64(ref Buf12 bufNum, uint power)
static unsafe void VarDecMul(ref DecCalc d1, ref DecCalc d2)
static unsafe uint GetExponent(float f)
static void InternalRound(ref DecCalc d, uint scale, MidpointRounding mode)
static readonly double[] s_doublePowers10
static int VarDecCmp(in decimal d1, in decimal d2)
static void Unscale(ref uint low, ref ulong high64, ref int scale)
static long VarCyFromDec(ref DecCalc pdecIn)
static bool Div96ByConst(ref ulong high64, ref uint low, uint pow)
static readonly PowerOvfl[] PowerOvflValues
static bool Add32To96(ref Buf12 bufNum, uint value)
static double VarR8FromDec(in decimal value)
static uint DecDivMod1E9(ref DecCalc value)
static int OverflowUnscale(ref Buf12 bufQuo, int scale, bool sticky)
static uint Div96By32(ref Buf12 bufNum, uint den)
static void VarDecFromR8(double input, out DecCalc result)
static ulong UInt32x32To64(uint a, uint b)
static int VarDecCmpSub(in decimal d1, in decimal d2)
static readonly ulong[] s_ulongPowers10
static bool operator>(decimal d1, decimal d2)
static ushort ToUInt16(decimal value)
static decimal Ceiling(decimal d)
static bool IsValid(int flags)
string ToString(string? format)
static decimal Parse(string s)
static decimal Parse(ReadOnlySpan< char > s, NumberStyles style=NumberStyles.Number, IFormatProvider? provider=null)
static decimal Round(decimal d)
Decimal(ReadOnlySpan< int > bits)
static short ToInt16(decimal value)
int CompareTo(object? value)
static decimal decimal Remainder INumber< decimal >. DivRem(decimal left, decimal right)
static decimal Abs(in decimal d)
static decimal Parse(string s, NumberStyles style)
static decimal FromOACurrency(long cy)
string ToString(IFormatProvider? provider)
static decimal operator%(decimal d1, decimal d2)
static decimal Multiply(decimal d1, decimal d2)
static bool TryParse(ReadOnlySpan< char > s, out decimal result)
static decimal Parse(string s, NumberStyles style, IFormatProvider? provider)
int CompareTo(decimal value)
Decimal(int lo, int mid, int hi, bool isNegative, byte scale)
static decimal ToDecimal(ReadOnlySpan< byte > span)
static decimal Round(decimal d, MidpointRounding mode)
static int GetBits(decimal d, Span< int > destination)
static int Compare(decimal d1, decimal d2)
static bool operator!=(decimal d1, decimal d2)
bool Equals(decimal value)
static void GetBytes(in decimal d, Span< byte > buffer)
static bool TryParse([NotNullWhen(true)] string? s, out decimal result)
static bool Equals(decimal d1, decimal d2)
static sbyte ToSByte(decimal value)
static int Sign(in decimal d)
static decimal Truncate(decimal d)
static bool operator<=(decimal d1, decimal d2)
Decimal(in decimal d, int flags)
static uint ToUInt32(decimal d)
static bool TryGetBits(decimal d, Span< int > destination, out int valuesWritten)
static decimal Round(decimal d, int decimals, MidpointRounding mode)
static bool TryParse(ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider, out decimal result)
static decimal operator++(decimal d)
override int GetHashCode()
static decimal Round(decimal d, int decimals)
static decimal Add(decimal d1, decimal d2)
bool TryFormat(Span< char > destination, out int charsWritten, ReadOnlySpan< char > format=default(ReadOnlySpan< char >), IFormatProvider? provider=null)
string ToString(string? format, IFormatProvider? provider)
static long ToOACurrency(decimal value)
static double ToDouble(decimal d)
static bool operator<(decimal d1, decimal d2)
static decimal operator+(decimal d)
static ref DecCalc AsMutable(ref decimal d)
override string ToString()
static ref readonly decimal Min(in decimal d1, in decimal d2)
static int ToInt32(decimal d)
static long ToInt64(decimal d)
static ulong ToUInt64(decimal d)
static void Truncate(ref decimal d)
static decimal Parse(string s, IFormatProvider? provider)
static decimal operator*(decimal d1, decimal d2)
static bool operator==(decimal d1, decimal d2)
static decimal Floor(decimal d)
static decimal operator--(decimal d)
static decimal Subtract(decimal d1, decimal d2)
Decimal(int lo, int mid, int hi, int flags)
static float ToSingle(decimal d)
static uint DecDivMod1E9(ref decimal value)
static decimal operator-(decimal d)
static int[] GetBits(decimal d)
static byte ToByte(decimal value)
static decimal Round(ref decimal d, int decimals, MidpointRounding mode)
static decimal Remainder(decimal d1, decimal d2)
override bool Equals([NotNullWhen(true)] object? value)
static decimal Divide(decimal d1, decimal d2)
Decimal(SerializationInfo info, StreamingContext context)
static bool operator>=(decimal d1, decimal d2)
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out decimal result)
static ref readonly decimal Max(in decimal d1, in decimal d2)
static decimal Negate(decimal d)
static decimal operator/(decimal d1, decimal d2)