30 writes to _iuLast
System.Numerics (30)
System\Numerics\BigIntegerBuilder.cs (30)
74
_iuLast
= 0;
91
_iuLast
= 0;
95
_iuLast
= _rgu.Length - 1;
98
--
_iuLast
;
112
_iuLast
= 0;
116
_iuLast
= _rgu.Length - 1;
119
--
_iuLast
;
181
_iuLast
= 0;
189
_iuLast
= 0;
229
while (--
_iuLast
> 0 && _rgu[_iuLast] == 0)
253
_iuLast
= 0;
260
_iuLast
= cu - 1;
270
_iuLast
= 0;
280
_iuLast
= cu - 1;
294
_iuLast
= 0;
311
_iuLast
= cu - 1;
328
_iuLast
= cu - 1;
371
_iuLast
= 0;
378
_iuLast
= reg._iuLast;
436
_iuLast
= reg._iuLast;
510
_iuLast
= BigInteger.GetDiffLength(_rgu, reg._rgu, _iuLast + 1) - 1;
512
_iuLast
= 0;
532
reg.
_iuLast
= _iuLast;
534
reg.
_iuLast
= cuSub - 1;
569
_iuLast
= reg._iuLast;
889
regNum.
_iuLast
= iu + cuDen - 1;
901
regNum.
_iuLast
= cuDen - 1;
937
_iuLast
-= cuShift;
1009
_iuLast
= iuLastNew;
1039
_rgu[++
_iuLast
] = 1;
174 references to _iuLast
System.Numerics (174)
System\Numerics\BigIntegerBuilder.cs (174)
40
if (
_iuLast
<= 0) {
41
Contract.Assert(
_iuLast
== 0);
45
Contract.Assert(_rgu != null && _rgu.Length >
_iuLast
);
46
Contract.Assert(!fTrimmed || _rgu[
_iuLast
] != 0);
65
if (
_iuLast
== 0)
97
while (
_iuLast
> 0 && _rgu[
_iuLast
] == 0)
118
while (
_iuLast
> 0 && _rgu[
_iuLast
] == 0)
137
if (
_iuLast
== 0) {
154
int cuExtra = _rgu.Length -
_iuLast
- 1;
157
if (cuExtra == 0 || _rgu[
_iuLast
+ 1] == 0) {
163
_rgu[
_iuLast
+ 1] = 0;
174
Array.Resize(ref bits,
_iuLast
+ 1);
199
public int Size { get { return
_iuLast
+ 1; } }
201
public uint High { get { return
_iuLast
== 0 ? _uSmall : _rgu[
_iuLast
]; } }
206
if (
_iuLast
== 0) {
212
int cuLeft =
_iuLast
- 1;
227
if (
_iuLast
> 0 && _rgu[
_iuLast
] == 0) {
229
while (--_iuLast > 0 && _rgu[
_iuLast
] == 0)
237
Contract.Assert(
_iuLast
> 0);
239
for (int iu =
_iuLast
; iu >= 0; --iu) {
292
if (
_iuLast
> 0)
299
if (
_iuLast
== 0)
302
Array.Copy(_rgu, rgu, Math.Min(cu,
_iuLast
+ 1));
306
else if (
_iuLast
+ 1 < cu) {
307
Array.Clear(_rgu,
_iuLast
+ 1, cu -
_iuLast
- 1);
308
if (
_iuLast
== 0)
326
if (
_iuLast
> 0) {
327
if (
_iuLast
>= cu)
329
Array.Copy(_rgu, rgu,
_iuLast
+ 1);
341
Contract.Assert(
_iuLast
> 0);
346
uint[] rgu = new uint[
_iuLast
+ 1 + cuExtra];
347
Array.Copy(_rgu, rgu,
_iuLast
+ 1);
369
if (reg.
_iuLast
== 0) {
374
if (!_fWritable || _rgu.Length <= reg.
_iuLast
) {
375
_rgu = new uint[reg.
_iuLast
+ 1 + cuExtra];
378
_iuLast = reg.
_iuLast
;
379
Array.Copy(reg._rgu, _rgu,
_iuLast
+ 1);
386
if (
_iuLast
== 0) {
414
if (reg.
_iuLast
== 0) {
418
if (
_iuLast
== 0) {
429
EnsureWritable(Math.Max(
_iuLast
, reg.
_iuLast
) + 1, 1);
431
int cuAdd = reg.
_iuLast
+ 1;
432
if (
_iuLast
< reg.
_iuLast
) {
433
cuAdd =
_iuLast
+ 1;
434
Array.Copy(reg._rgu,
_iuLast
+ 1, _rgu,
_iuLast
+ 1, reg.
_iuLast
-
_iuLast
);
435
Contract.Assert(
_iuLast
> 0);
436
_iuLast = reg.
_iuLast
;
455
if (
_iuLast
== 0) {
485
if (reg.
_iuLast
== 0) {
489
if (
_iuLast
== 0) {
501
if (
_iuLast
< reg.
_iuLast
) {
507
int cuSub = reg.
_iuLast
+ 1;
508
if (
_iuLast
== reg.
_iuLast
) {
510
_iuLast = BigInteger.GetDiffLength(_rgu, reg._rgu,
_iuLast
+ 1) - 1;
511
if (
_iuLast
< 0) {
517
uint u1 = _rgu[
_iuLast
];
518
uint u2 = reg._rgu[
_iuLast
];
519
if (
_iuLast
== 0) {
531
Contract.Assert(
_iuLast
> 0);
532
reg._iuLast =
_iuLast
;
535
Contract.Assert(reg.
_iuLast
> 0);
539
cuSub =
_iuLast
+ 1;
551
Contract.Assert(uBorrow == 1 && cuSub <=
_iuLast
);
560
Contract.Assert(0 <
_iuLast
&&
_iuLast
<= reg.
_iuLast
);
561
Contract.Assert(
_iuLast
< reg.
_iuLast
|| _rgu[
_iuLast
] < reg._rgu[
_iuLast
]);
563
EnsureWritable(reg.
_iuLast
+ 1, 0);
565
int cuSub =
_iuLast
+ 1;
566
if (
_iuLast
< reg.
_iuLast
) {
567
Array.Copy(reg._rgu,
_iuLast
+ 1, _rgu,
_iuLast
+ 1, reg.
_iuLast
-
_iuLast
);
568
Contract.Assert(
_iuLast
> 0);
569
_iuLast = reg.
_iuLast
;
592
if (
_iuLast
== 0) {
600
for (int iu = 0; iu <=
_iuLast
; iu++)
604
SetSizeKeep(
_iuLast
+ 2, 0);
605
_rgu[
_iuLast
] = uCarry;
614
if (regMul.
_iuLast
== 0)
616
else if (
_iuLast
== 0) {
626
int cuBase =
_iuLast
+ 1;
627
SetSizeKeep(cuBase + regMul.
_iuLast
, 1);
633
for (int iuSrc = 0; iuSrc <= regMul.
_iuLast
; iuSrc++)
636
for (int iuDst = iu + regMul.
_iuLast
+ 1; uCarry != 0 && iuDst <=
_iuLast
; iuDst++)
639
SetSizeKeep(
_iuLast
+ 2, 0);
640
_rgu[
_iuLast
] = uCarry;
656
if (reg1.
_iuLast
== 0) {
657
if (reg2.
_iuLast
== 0)
664
else if (reg2.
_iuLast
== 0) {
669
Contract.Assert(reg1.
_iuLast
> 0 && reg2.
_iuLast
> 0);
670
SetSizeClear(reg1.
_iuLast
+ reg2.
_iuLast
+ 2);
677
rgu1 = reg1._rgu; cu1 = reg1.
_iuLast
+ 1;
678
rgu2 = reg2._rgu; cu2 = reg2.
_iuLast
+ 1;
681
rgu1 = reg2._rgu; cu1 = reg2.
_iuLast
+ 1;
682
rgu2 = reg1._rgu; cu2 = reg1.
_iuLast
+ 1;
707
if (
_iuLast
== 0) {
716
for (int iv =
_iuLast
; iv >= 0; iv--) {
731
if (regNum.
_iuLast
== 0)
735
for (int iv = regNum.
_iuLast
; iv >= 0; iv--) {
747
if (regDen.
_iuLast
== 0) {
751
if (
_iuLast
== 0)
763
if (regDen.
_iuLast
== 0) {
767
if (
_iuLast
== 0) {
779
if (regDen.
_iuLast
== 0) {
784
if (
_iuLast
== 0)
791
Contract.Assert(regNum.
_iuLast
> 0 && regDen.
_iuLast
> 0);
794
if (regNum.
_iuLast
< regDen.
_iuLast
)
797
Contract.Assert(0 < regDen.
_iuLast
&& regDen.
_iuLast
<= regNum.
_iuLast
);
798
int cuDen = regDen.
_iuLast
+ 1;
799
int cuDiff = regNum.
_iuLast
- regDen.
_iuLast
;
803
for (int iu = regNum.
_iuLast
; ; iu--) {
835
Contract.Assert(cuQuo + cuDen == regNum.
_iuLast
+ 1 || cuQuo + cuDen == regNum.
_iuLast
+ 2);
840
uint uNumHi = (iu + cuDen <= regNum.
_iuLast
) ? regNum._rgu[iu + cuDen] : 0;
900
Contract.Assert(cuDen > 1 && regNum.
_iuLast
> 0);
925
if (cuShift >
_iuLast
) {
929
if (
_iuLast
== 0) {
936
int cuSrc =
_iuLast
+ 1;
938
if (
_iuLast
== 0)
941
Contract.Assert(_rgu.Length >
_iuLast
);
943
_rgu = new uint[
_iuLast
+ 1];
949
_rgu[
_iuLast
] = rguSrc[cuSrc - 1] >> cbitShift;
953
Array.Copy(rguSrc, cuShift, _rgu, 0,
_iuLast
+ 1);
974
int iuLastNew =
_iuLast
+ cuShift;
993
if (
_iuLast
== 0) {
999
Array.Copy(rguSrc, 0, _rgu, cuShift,
_iuLast
+ 1);
1001
int iuSrc =
_iuLast
;
1002
int iuDst =
_iuLast
+ cuShift;
1018
Contract.Assert(
_iuLast
> 0);
1019
Contract.Assert(cu >
_iuLast
);
1021
if (cu - 1 <=
_iuLast
)
1023
if (cu - 2 ==
_iuLast
)
1032
Contract.Assert(_fWritable &&
_iuLast
> 0);
1033
Contract.Assert(iu <=
_iuLast
+ 1);
1036
if (iu >
_iuLast
) {
1037
if (
_iuLast
+ 1 == _rgu.Length)
1038
Array.Resize(ref _rgu,
_iuLast
+ 2);
1050
Contract.Assert(_fWritable &&
_iuLast
> 0);
1051
Contract.Assert(iuMin <=
_iuLast
);
1053
for (int iu = iuMin; iu <=
_iuLast
; iu++) {
1097
if (reg1.
_iuLast
> 0 && reg1._rgu[0] == 0 || reg2.
_iuLast
> 0 && reg2._rgu[0] == 0) {
1123
int cuMax = reg1.
_iuLast
+ 1;
1124
int cuMin = reg2.
_iuLast
+ 1;
1129
Contract.Assert(cuMax == reg1.
_iuLast
+ 1);
1130
Contract.Assert(cuMin == reg2.
_iuLast
+ 1);
1178
Contract.Assert(reg1.
_iuLast
< cuMin - 1);
1306
if (
_iuLast
== 0) {