75 references to _blocks
System.Private.CoreLib (75)
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (75)
346
ulong sum = carry + large.
_blocks
[largeIndex] + small.
_blocks
[smallIndex];
348
result.
_blocks
[resultIndex] = (uint)sum;
358
ulong sum = carry + large.
_blocks
[largeIndex];
360
result.
_blocks
[resultIndex] = (uint)sum;
385
result.
_blocks
[resultIndex] = 1;
413
long delta = (long)lhs.
_blocks
[index] - rhs.
_blocks
[index];
445
return (lastIndex * BitsPerBlock) + CountSignificantBits(value.
_blocks
[lastIndex]);
469
(uint quotient, uint remainder) = Math.DivRem(lhs.
_blocks
[0], rhs.
_blocks
[0]);
481
ulong rhsValue = rhs.
_blocks
[0];
486
ulong value = (carry << 32) | lhs.
_blocks
[i];
496
quo.
_blocks
[i] = (uint)digit;
523
uint divHi = rhs.
_blocks
[rhsLength - 1];
524
uint divLo = rhs.
_blocks
[rhsLength - 2];
538
divLo |= rhs.
_blocks
[rhsLength - 3] >> shiftRight;
547
uint t = i < lhsLength ? rem.
_blocks
[i] : 0;
549
ulong valHi = ((ulong)t << 32) | rem.
_blocks
[i - 1];
550
uint valLo = i > 1 ? rem.
_blocks
[i - 2] : 0;
560
valLo |= rem.
_blocks
[i - 3] >> shiftRight;
611
quo.
_blocks
[n] = (uint)digit;
627
if (rem.
_blocks
[i] == 0)
655
uint quotient = dividend.
_blocks
[lastIndex] / (divisor.
_blocks
[lastIndex] + 1);
668
ulong product = ((ulong)divisor.
_blocks
[index] * quotient) + carry;
671
ulong difference = (ulong)dividend.
_blocks
[index] - (uint)product - borrow;
674
dividend.
_blocks
[index] = (uint)difference;
681
while ((divisorLength > 0) && (dividend.
_blocks
[divisorLength - 1] == 0))
701
ulong difference = (ulong)dividend.
_blocks
[index] - divisor.
_blocks
[index] - borrow;
704
dividend.
_blocks
[index] = (uint)difference;
711
while ((divisorLength > 0) && (dividend.
_blocks
[divisorLength - 1] == 0))
751
ulong product = ((ulong)lhs.
_blocks
[index] * value) + carry;
752
result.
_blocks
[index] = (uint)product;
774
result.
_blocks
[index] = carry;
835
if (small.
_blocks
[smallIndex] != 0)
844
ulong product = result.
_blocks
[resultIndex] + ((ulong)small.
_blocks
[smallIndex] * large.
_blocks
[largeIndex]) + carry;
846
result.
_blocks
[resultIndex] = (uint)product;
853
result.
_blocks
[resultIndex] = (uint)carry;
860
if ((maxResultLength > 0) && (result.
_blocks
[maxResultLength - 1] == 0))
889
result.
_blocks
[blocksToShift] = 1U << remainingBitsToShift;
981
ref uint lhsValue = ref lhs.
_blocks
[lhsStartIndex + i];
983
ulong digit = lhsValue + carry + rhs.
_blocks
[i];
1038
carry += rhs.
_blocks
[i] * q;
1042
ref uint lhsValue = ref lhs.
_blocks
[lhsStartIndex + i];
1064
_blocks
[0] += value;
1065
if (
_blocks
[0] >= value)
1073
_blocks
[index]++;
1074
if (
_blocks
[index] > 0)
1093
_blocks
[length] = 1;
1100
return
_blocks
[index];
1144
ulong block =
_blocks
[index];
1147
_blocks
[index] = (uint)product;
1166
_blocks
[index] = (uint)carry;
1194
result.
_blocks
[0] = value;
1209
result.
_blocks
[0] = (uint)value;
1210
result.
_blocks
[1] = (uint)(value >> 32);
1222
Buffer.Memmove(ref result.
_blocks
[0], ref value.
_blocks
[0], (nuint)rhsLength);
1266
_blocks
[writeIndex] =
_blocks
[readIndex];
1300
uint block =
_blocks
[readIndex];
1305
_blocks
[writeIndex] = highBits | lowBits;
1311
block =
_blocks
[readIndex];
1316
_blocks
[writeIndex] = highBits | lowBits;
1317
_blocks
[writeIndex - 1] = block << remainingBitsToShift;
1323
if (
_blocks
[_length - 1] == 0)
1334
return
_blocks
[0];
1344
return ((ulong)
_blocks
[1] << 32) +
_blocks
[0];
1349
return
_blocks
[0];
1355
private void Clear(int length) => ((Span<uint>)
_blocks
).Slice(0, length).Clear();