62 references to DecCalc
System.Private.CoreLib (62)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (40)
189DecCalc.VarDecFromR4(value, out AsMutable(ref this)); 196DecCalc.VarDecFromR8(value, out AsMutable(ref this)); 257return DecCalc.VarCyFromDec(ref AsMutable(ref value)); 391DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), false); 401DecCalc.InternalRound(ref AsMutable(ref d), (byte)(flags >> ScaleShift), MidpointRounding.ToPositiveInfinity); 410return DecCalc.VarDecCmp(in d1, in d2); 427return DecCalc.VarDecCmp(in this, in other); 432return DecCalc.VarDecCmp(in this, in value); 439DecCalc.VarDecDiv(ref AsMutable(ref d1), ref AsMutable(ref d2)); 449DecCalc.Equals(in this, in other); 452DecCalc.Equals(in this, in value); 456public override int GetHashCode() => DecCalc.GetHashCode(in this); 463return DecCalc.Equals(in d1, in d2); 473DecCalc.InternalRound(ref AsMutable(ref d), (byte)(flags >> ScaleShift), MidpointRounding.ToNegativeInfinity); 645DecCalc.VarDecMod(ref AsMutable(ref d1), ref AsMutable(ref d2)); 653DecCalc.VarDecMul(ref AsMutable(ref d1), ref AsMutable(ref d2)); 687DecCalc.InternalRound(ref AsMutable(ref d), (uint)scale, mode); 695DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), true); 765return DecCalc.VarR8FromDec(in d); 874return DecCalc.VarR4FromDec(in d); 892DecCalc.InternalRound(ref AsMutable(ref d), (byte)(flags >> ScaleShift), MidpointRounding.ToZero); 955public static explicit operator float(decimal value) => DecCalc.VarR4FromDec(in value); 957public static explicit operator double(decimal value) => DecCalc.VarR8FromDec(in value); 971DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), false); 977DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), true); 984DecCalc.VarDecMul(ref AsMutable(ref d1), ref AsMutable(ref d2)); 991DecCalc.VarDecDiv(ref AsMutable(ref d1), ref AsMutable(ref d2)); 998DecCalc.VarDecMod(ref AsMutable(ref d1), ref AsMutable(ref d2)); 1003public static bool operator ==(decimal d1, decimal d2) => DecCalc.Equals(in d1, in d2); 1006public static bool operator !=(decimal d1, decimal d2) => !DecCalc.Equals(in d1, in d2); 1009public static bool operator <(decimal d1, decimal d2) => DecCalc.VarDecCmp(in d1, in d2) < 0; 1012public static bool operator <=(decimal d1, decimal d2) => DecCalc.VarDecCmp(in d1, in d2) <= 0; 1015public static bool operator >(decimal d1, decimal d2) => DecCalc.VarDecCmp(in d1, in d2) > 0; 1018public static bool operator >=(decimal d1, decimal d2) => DecCalc.VarDecCmp(in d1, in d2) >= 0; 1081return DecCalc.VarR4FromDec(in this); 1086return DecCalc.VarR8FromDec(in this); 1247return DecCalc.VarDecCmp(in x, in y) >= 0 ? x : y; 1256return DecCalc.VarDecCmp(in x, in y) < 0 ? x : y; 1425int c = DecCalc.VarDecCmp(Abs(x), Abs(y)); 1446int c = DecCalc.VarDecCmp(Abs(x), Abs(y));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (22)
25private static ref DecCalc AsMutable(ref decimal d) => ref Unsafe.As<decimal, DecCalc>(ref d); 31return DecCalc.DecDivMod1E9(ref AsMutable(ref value)); 166private static void UInt64x64To128(ulong a, ulong b, ref DecCalc result) 953internal static void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign) 1286internal static long VarCyFromDec(ref DecCalc pdecIn) 1426internal static void VarDecMul(ref DecCalc d1, ref DecCalc d2) 1585internal static void VarDecFromR4(float input, out DecCalc result) 1593internal static void VarDecFromR8(double input, out DecCalc result) 1611private static void VarDecFromFloat<TNumber>(TNumber input, out DecCalc result) 1914internal static void VarDecDiv(ref DecCalc d1, ref DecCalc d2) 2180internal static void VarDecMod(ref DecCalc d1, ref DecCalc d2) 2191int cmp = VarDecCmpSub(in Unsafe.As<DecCalc, decimal>(ref d1), in Unsafe.As<DecCalc, decimal>(ref d2)); 2287private static void VarDecModFull(ref DecCalc d1, ref DecCalc d2, int scale) 2391internal static void InternalRound(ref DecCalc d, uint scale, MidpointRounding mode) 2509internal static uint DecDivMod1E9(ref DecCalc value)