37 writes to _sign
System.Numerics (37)
System\Numerics\BigInteger.cs (37)
397
_sign
= value;
408
_sign
= (int)value;
413
_sign
= +1;
428
_sign
= (int)value;
439
_sign
= -1;
445
_sign
= +1;
459
_sign
= (int)value;
464
_sign
= +1;
480
_sign
= 0;
494
_sign
= 0;
516
_sign
= bits[0];
517
_sign
*= ((bits[3] & DecimalSignMask) != 0) ? -1 : +1;
527
_sign
= ((bits[3] & DecimalSignMask) != 0) ? -1 : +1;
551
_sign
= 0;
561
_sign
= unchecked((int)0xffffffff);
563
_sign
= 0;
566
_sign
<<= 8;
567
_sign
|= value[i];
579
_sign
= +1;
634
_sign
= (-1) * ((int)val[0]);
639
_sign
= -1;
644
_sign
= -1;
650
_sign
= +1;
659
_sign
= n;
691
_sign
= (negative ? -(int)value[0] : (int)value[0]);
699
_sign
= negative ? -1 : +1;
735
_sign
= +1;
742
_sign
= (int)value[0];
752
_sign
= +1;
758
_sign
= +1;
782
_sign
= (-1) * ((int)value[0]);
789
_sign
= -1;
795
_sign
= -1;
1478
value.
_sign
= -value._sign;
1757
_sign
= -_sign;
1763
_sign
= -_sign;
1784
_sign
= sign;
91 references to _sign
System.Numerics (91)
System\Numerics\BigInteger.cs (86)
67
Contract.Assert(
_sign
== 1 ||
_sign
== -1 /*, "_sign must be +1 or -1 when _bits is non-null"*/);
73
Contract.Assert(
_sign
> int.MinValue /*, "Int32.MinValue should not be stored in the _sign field"*/);
102
return (
_sign
& (
_sign
- 1)) == 0 &&
_sign
!= 0;
104
if (
_sign
!= 1)
118
public bool IsZero { get { AssertValid(); return
_sign
== 0; } }
120
public bool IsOne { get { AssertValid(); return
_sign
== 1 && _bits == null; } }
122
public bool IsEven { get { AssertValid(); return _bits == null ? (
_sign
& 1) == 0 : (_bits[0] & 1) == 0; } }
126
get { AssertValid(); return (
_sign
>> (kcbitUint - 1)) - (-
_sign
>> (kcbitUint - 1)); }
149
return
_sign
;
150
int hash =
_sign
;
161
return
_sign
== other;
164
if ((
_sign
^ other) < 0 || (cu = Length(_bits)) > 2)
179
if (
_sign
< 0)
182
return (ulong)
_sign
== other;
197
if (
_sign
!= other.
_sign
)
217
return ((long)
_sign
).CompareTo(other);
219
if ((
_sign
^ other) < 0 || (cu = Length(_bits)) > 2)
220
return
_sign
;
223
return
_sign
* uuTmp.CompareTo(uu);
231
if (
_sign
< 0)
234
return ((ulong)
_sign
).CompareTo(other);
247
if ((
_sign
^ other.
_sign
) < 0)
250
return
_sign
< 0 ? -1 : +1;
257
return
_sign
< other.
_sign
? -1 :
_sign
> other.
_sign
? +1 : 0;
258
return -other.
_sign
;
262
return
_sign
;
264
return -
_sign
;
269
return _bits[cuDiff - 1] < other._bits[cuDiff - 1] ? -
_sign
:
_sign
;
286
if (_bits == null &&
_sign
== 0)
296
dwords = new uint[] { (uint)
_sign
};
297
highByte = (byte)((
_sign
< 0) ? 0xff : 0x00);
299
else if(
_sign
== -1) {
338
if (_bits == null &&
_sign
== 0)
345
dwords = new uint[] { (uint)
_sign
};
346
highDWord = (
_sign
< 0) ? UInt32.MaxValue : 0;
348
else if(
_sign
== -1) {
571
if (
_sign
< 0 && !isNegative)
578
_bits[0] = (uint)
_sign
;
581
if (
_sign
== Int32.MinValue)
694
if (
_sign
== Int32.MinValue)
901
if (value.
_sign
< 0 || baseValue == 1.0D)
908
return Math.Log((double)value.
_sign
, baseValue);
945
if (left.
_sign
== 0) return BigInteger.Abs(right);
946
if (right.
_sign
== 0) return BigInteger.Abs(left);
1031
ModPowInner((uint) exponent.
_sign
, ref regRes, ref regVal, ref regMod, ref regTmp);
1044
return regRes.GetInteger(value.
_sign
> 0 ? +1 : expIsEven ? +1 : -1);
1061
if (value.
_sign
== 1)
1063
if (value.
_sign
== -1)
1065
if (value.
_sign
== 0)
1217
return value.
_sign
; // value packed into int32 sign
1222
else if (value.
_sign
> 0) {
1238
return checked((uint)value.
_sign
);
1240
else if (Length(value._bits) > 1 || value.
_sign
< 0) {
1252
return value.
_sign
;
1268
long ll = value.
_sign
> 0 ? (long)uu : -(long)uu;
1269
if ((ll > 0 && value.
_sign
> 0) || (ll < 0 && value.
_sign
< 0)) {
1281
return checked((ulong)value.
_sign
);
1285
if (len > 2 || value.
_sign
< 0) {
1306
return value.
_sign
;
1320
return (Decimal)value.
_sign
;
1330
return new Decimal(lo, mi, hi, value.
_sign
< 0, 0);
1341
uint xExtend = (left.
_sign
< 0) ? UInt32.MaxValue : 0;
1342
uint yExtend = (right.
_sign
< 0) ? UInt32.MaxValue : 0;
1361
uint xExtend = (left.
_sign
< 0) ? UInt32.MaxValue : 0;
1362
uint yExtend = (right.
_sign
< 0) ? UInt32.MaxValue : 0;
1376
uint xExtend = (left.
_sign
< 0) ? UInt32.MaxValue : 0;
1377
uint yExtend = (right.
_sign
< 0) ? UInt32.MaxValue : 0;
1478
value._sign = -value.
_sign
;
1757
_sign = -
_sign
;
1763
_sign = -
_sign
;
1802
internal int _Sign { get { return
_sign
; } }
1832
if (x.
_sign
< 0) {
1833
xd = new uint[] {(uint)-x.
_sign
};
1836
xd = new uint[] {(uint)x.
_sign
};
1843
return x.
_sign
< 0;
System\Numerics\BigNumber.cs (5)
497
sb.Insert(0, (value.
_sign
>= 0 ? ("0") : (format == 'x' ? "f" : "F")), digits - sb.Length);
534
return value.
_sign
.ToString(format, info);
577
if (value.
_sign
< 0) {
619
number.sign = (value.
_sign
< 0);
648
if (value.
_sign
< 0) {