59 references to DecCalc
System.Private.CoreLib (59)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (38)
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.VarDecCmp(in this, in other) == 0; 452DecCalc.VarDecCmp(in this, in value) == 0; 456public override int GetHashCode() => DecCalc.GetHashCode(in this); 463return DecCalc.VarDecCmp(in d1, in d2) == 0; 473DecCalc.InternalRound(ref AsMutable(ref d), (byte)(flags >> ScaleShift), MidpointRounding.ToNegativeInfinity); 651DecCalc.VarDecMod(ref AsMutable(ref d1), ref AsMutable(ref d2)); 659DecCalc.VarDecMul(ref AsMutable(ref d1), ref AsMutable(ref d2)); 693DecCalc.InternalRound(ref AsMutable(ref d), (uint)scale, mode); 701DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), true); 771return DecCalc.VarR8FromDec(in d); 880return DecCalc.VarR4FromDec(in d); 898DecCalc.InternalRound(ref AsMutable(ref d), (byte)(flags >> ScaleShift), MidpointRounding.ToZero); 961public static explicit operator float(decimal value) => DecCalc.VarR4FromDec(in value); 963public static explicit operator double(decimal value) => DecCalc.VarR8FromDec(in value); 977DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), false); 983DecCalc.DecAddSub(ref AsMutable(ref d1), ref AsMutable(ref d2), true); 990DecCalc.VarDecMul(ref AsMutable(ref d1), ref AsMutable(ref d2)); 997DecCalc.VarDecDiv(ref AsMutable(ref d1), ref AsMutable(ref d2)); 1004DecCalc.VarDecMod(ref AsMutable(ref d1), ref AsMutable(ref 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; 1021public static bool operator >(decimal d1, decimal d2) => DecCalc.VarDecCmp(in d1, in d2) > 0; 1024public static bool operator >=(decimal d1, decimal d2) => DecCalc.VarDecCmp(in d1, in d2) >= 0; 1087return DecCalc.VarR4FromDec(in this); 1092return DecCalc.VarR8FromDec(in this); 1277return DecCalc.VarDecCmp(in x, in y) >= 0 ? x : y; 1286return DecCalc.VarDecCmp(in x, in y) < 0 ? x : y;
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (21)
24private static ref DecCalc AsMutable(ref decimal d) => ref Unsafe.As<decimal, DecCalc>(ref d); 30return DecCalc.DecDivMod1E9(ref AsMutable(ref value)); 182private static void UInt64x64To128(ulong a, ulong b, ref DecCalc result) 958internal static unsafe void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign) 1276internal static long VarCyFromDec(ref DecCalc pdecIn) 1402internal static unsafe void VarDecMul(ref DecCalc d1, ref DecCalc d2) 1561internal static void VarDecFromR4(float input, out DecCalc result) 1721internal static void VarDecFromR8(double input, out DecCalc result) 1938internal static unsafe void VarDecDiv(ref DecCalc d1, ref DecCalc d2) 2207internal static void VarDecMod(ref DecCalc d1, ref DecCalc d2) 2218int cmp = VarDecCmpSub(in Unsafe.As<DecCalc, decimal>(ref d1), in Unsafe.As<DecCalc, decimal>(ref d2)); 2296private static unsafe void VarDecModFull(ref DecCalc d1, ref DecCalc d2, int scale) 2388internal static void InternalRound(ref DecCalc d, uint scale, MidpointRounding mode) 2506internal static uint DecDivMod1E9(ref DecCalc value)