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