112 references to BigInteger
System.Private.CoreLib (112)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (43)
323
public static void Add(scoped ref
BigInteger
lhs, scoped ref
BigInteger
rhs, out
BigInteger
result)
328
ref
BigInteger
large = ref (lhs._length < rhs._length) ? ref rhs : ref lhs;
329
ref
BigInteger
small = ref (lhs._length < rhs._length) ? ref lhs : ref rhs;
390
public static int Compare(scoped ref
BigInteger
lhs, scoped ref
BigInteger
rhs)
434
public static int CountSignificantBits(ref
BigInteger
value)
448
public static void DivRem(scoped ref
BigInteger
lhs, scoped ref
BigInteger
rhs, out
BigInteger
quo, out
BigInteger
rem)
642
public static uint HeuristicDivide(ref
BigInteger
dividend, ref
BigInteger
divisor)
722
public static void Multiply(scoped ref
BigInteger
lhs, uint value, out
BigInteger
result)
781
public static void Multiply(scoped ref
BigInteger
lhs, scoped ref
BigInteger
rhs, out
BigInteger
result)
797
ref readonly
BigInteger
large = ref lhs;
800
ref readonly
BigInteger
small = ref rhs;
866
public static void Pow2(int exponent, out
BigInteger
result)
892
public static void Pow10(uint exponent, out
BigInteger
result)
924
SetUInt32(out
BigInteger
temp1, Pow10UInt32Table[(int)(exponent & 0x7)]);
925
ref
BigInteger
lhs = ref temp1;
927
SetZero(out
BigInteger
temp2);
928
ref
BigInteger
product = ref temp2;
944
Debug.Assert((pow10BigNumTableIndex + ((sizeof(
BigInteger
) + sizeof(uint) - 1) / sizeof(uint))) < Pow10BigNumTable.Length);
946
ref
BigInteger
rhs = ref Unsafe.As<uint,
BigInteger
>(ref Unsafe.AsRef(in Pow10BigNumTable[pow10BigNumTableIndex]));
950
ref
BigInteger
temp = ref product;
963
private static uint AddDivisor(ref
BigInteger
lhs, int lhsStartIndex, ref
BigInteger
rhs)
1018
private static uint SubtractDivisor(ref
BigInteger
lhs, int lhsStartIndex, ref
BigInteger
rhs, ulong q)
1115
public void Multiply(scoped ref
BigInteger
value)
1123
SetValue(out
BigInteger
temp, ref this);
1176
Pow10(exponent, out
BigInteger
poweredValue);
1181
public static void SetUInt32(out
BigInteger
result, uint value)
1196
public static void SetUInt64(out
BigInteger
result, ulong value)
1213
public static void SetValue(out
BigInteger
result, scoped ref
BigInteger
value)
1222
public static void SetZero(out
BigInteger
result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Dragon4.cs (37)
80
BigInteger
scale; // positive scale applied to value and margin such that they can be represented as whole numbers
81
BigInteger
scaledValue; // scale * mantissa
82
BigInteger
scaledMarginLow; // scale * 0.5 * (distance between this floating-point number and its immediate lower value)
86
BigInteger
optionalMarginHigh;
100
BigInteger
.SetUInt64(out scaledValue, 4 * mantissa);
104
BigInteger
.SetUInt32(out scale, 4);
107
BigInteger
.Pow2(exponent, out scaledMarginLow);
110
BigInteger
.Pow2(exponent + 1, out optionalMarginHigh);
117
BigInteger
.SetUInt64(out scaledValue, 4 * mantissa);
120
BigInteger
.Pow2(-exponent + 2, out scale);
123
BigInteger
.SetUInt32(out scaledMarginLow, 1);
126
BigInteger
.SetUInt32(out optionalMarginHigh, 2);
141
BigInteger
.SetUInt64(out scaledValue, 2 * mantissa);
145
BigInteger
.SetUInt32(out scale, 2);
148
BigInteger
.Pow2(exponent, out scaledMarginLow);
155
BigInteger
.SetUInt64(out scaledValue, 2 * mantissa);
158
BigInteger
.Pow2(-exponent + 1, out scale);
161
BigInteger
.SetUInt32(out scaledMarginLow, 1);
169
scoped ref
BigInteger
scaledMarginHigh = ref (hasUnequalMargins ? ref optionalMarginHigh : ref scaledMarginLow);
199
BigInteger
.Pow10((uint)(-digitExponent), out
BigInteger
pow10);
206
BigInteger
.Multiply(ref scaledMarginLow, 2, out scaledMarginHigh);
219
BigInteger
.Add(ref scaledValue, ref scaledMarginHigh, out
BigInteger
scaledValueHigh);
220
int cmpHigh =
BigInteger
.Compare(ref scaledValueHigh, ref scale);
225
estimateTooLow =
BigInteger
.Compare(ref scaledValue, ref scale) >= 0;
244
BigInteger
.Multiply(ref scaledMarginLow, 2, out scaledMarginHigh);
303
BigInteger
.Multiply(ref scaledMarginLow, 2, out scaledMarginHigh);
323
outputDigit =
BigInteger
.HeuristicDivide(ref scaledValue, ref scale);
327
BigInteger
.Add(ref scaledValue, ref scaledMarginHigh, out
BigInteger
scaledValueHigh);
330
int cmpLow =
BigInteger
.Compare(ref scaledValue, ref scaledMarginLow);
331
int cmpHigh =
BigInteger
.Compare(ref scaledValueHigh, ref scale);
359
BigInteger
.Multiply(ref scaledMarginLow, 2, out scaledMarginHigh);
376
outputDigit =
BigInteger
.HeuristicDivide(ref scaledValue, ref scale);
404
outputDigit =
BigInteger
.HeuristicDivide(ref scaledValue, ref scale);
437
int compare =
BigInteger
.Compare(ref scaledValue, ref scale);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (16)
700
internal static void AccumulateDecimalDigitsIntoBigInteger(scoped ref NumberBuffer number, uint firstIndex, uint lastIndex, out
BigInteger
result)
702
BigInteger
.SetZero(out result);
726
int initialMantissaBits =
BigInteger
.CountSignificantBits(initialMantissa);
839
private static ulong ConvertBigIntegerToFloatingPointBits<TFloat>(ref
BigInteger
value, int integerBitsOfPrecision, bool hasNonZeroFractionalPart)
1082
AccumulateDecimalDigitsIntoBigInteger(ref number, IntegerFirstIndex, integerLastIndex, out
BigInteger
integerValue);
1098
int integerBitsOfPrecision =
BigInteger
.CountSignificantBits(ref integerValue);
1132
AccumulateDecimalDigitsIntoBigInteger(ref number, fractionalFirstIndex, fractionalLastIndex, out
BigInteger
fractionalNumerator);
1143
BigInteger
.Pow10(fractionalDenominatorExponent, out
BigInteger
fractionalDenominator);
1151
int fractionalNumeratorBits =
BigInteger
.CountSignificantBits(ref fractionalNumerator);
1152
int fractionalDenominatorBits =
BigInteger
.CountSignificantBits(ref fractionalDenominator);
1202
if (
BigInteger
.Compare(ref fractionalNumerator, ref fractionalDenominator) < 0)
1209
BigInteger
.DivRem(ref fractionalNumerator, ref fractionalDenominator, out
BigInteger
bigFractionalMantissa, out
BigInteger
fractionalRemainder);
1215
int fractionalMantissaBits =
BigInteger
.CountSignificantBits(fractionalMantissa);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Rounding.cs (15)
321
BigInteger
.SetUInt64(out
BigInteger
numerator, mantissa);
322
BigInteger
denominator;
328
BigInteger
.SetUInt32(out denominator, 1);
333
BigInteger
.Pow2(-exponent, out denominator);
336
BigInteger
.DivRem(ref numerator, ref denominator, out
BigInteger
quotient, out
BigInteger
remainder);
344
int midpointComparison =
BigInteger
.Compare(ref remainder, ref denominator);
401
BigInteger
.SetUInt32(out
BigInteger
ten, 10);
406
BigInteger
.DivRem(ref quotient, ref ten, out
BigInteger
newQuotient, out
BigInteger
digit);
409
BigInteger
.SetValue(out quotient, ref newQuotient);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1752
Number.AccumulateDecimalDigitsIntoBigInteger(ref number, 0, (uint)digits, out Number.
BigInteger
result);