Home | History | Annotate | Download | only in python2.7

Lines Matching refs:_sign

174                context._raise_error(NewError, '(-x)!', self._sign) would
175 call NewError().handle(context, self._sign).)
221 ans = _dec_from_triple(args[0]._sign, args[0]._int, 'n', True)
509 __slots__ = ('_exp','_int','_sign', '_is_special')
511 # (-1)**_sign * _int * 10**_exp
551 self._sign = 1
553 self._sign = 0
581 self._sign = 0
583 self._sign = 1
592 self._sign = value._sign
599 self._sign = value.sign
616 self._sign = value[0]
653 self._sign = value._sign
723 if self._sign:
821 return -((-1)**other._sign)
823 return (-1)**self._sign
826 if other._sign < self._sign:
828 if self._sign < other._sign:
839 return -(-1)**self._sign
841 return (-1)**self._sign
843 return (-1)**self._sign
845 return -((-1)**self._sign)
957 if self._sign:
983 return hash((self._sign,
992 return DecimalTuple(self._sign, tuple(map(int, self._int)), self._exp)
1005 sign = ['', '-'][self._sign]
1119 if self._sign:
1145 if self._sign != other._sign and other._isinfinity():
1153 if context.rounding == ROUND_FLOOR and self._sign != other._sign:
1158 sign = min(self._sign, other._sign)
1248 resultsign = self._sign ^ other._sign
1302 sign = self._sign ^ other._sign
1358 sign = self._sign ^ other._sign
1378 _dec_from_triple(self._sign, str(r), ideal_exp))
1410 sign = self._sign ^ other._sign
1507 ans = _dec_from_triple(self._sign, '0', ideal_exponent)
1539 sign = self._sign
1564 return _SignedInfinity[self._sign ^ other._sign]
1569 self._sign ^ other._sign)
1587 s = "-nan" if self._sign else "nan"
1599 s = (-1)**self._sign
1637 return _dec_from_triple(self._sign, payload, self._exp, True)
1667 return _dec_from_triple(self._sign, '0', new_exp)
1676 ans = context._raise_error(Overflow, 'above Emax', self._sign)
1689 self = _dec_from_triple(self._sign, '1', exp_min-1)
1702 ans = context._raise_error(Overflow, 'above Emax', self._sign)
1704 ans = _dec_from_triple(self._sign, coeff, exp_min)
1727 return _dec_from_triple(self._sign, self_padded, Etop)
1779 if self._sign:
1786 if not self._sign:
1839 product = _SignedInfinity[self._sign ^ other._sign]
1844 product = _SignedInfinity[self._sign ^ other._sign]
1846 product = _dec_from_triple(self._sign ^ other._sign,
1921 sign = self._sign
2021 if other._isinteger() and other._sign == 0:
2167 if other._isinteger() and other._sign == 0:
2220 # result has sign 1 iff self._sign is 1 and other is an odd integer
2222 if self._sign == 1:
2237 if other._sign == 0:
2244 if other._sign == 0:
2258 if other._sign == 1:
2282 if (other._sign == 0) == (self_adj < 0):
2298 if (self_adj >= 0) == (other._sign == 0):
2357 ans = _dec_from_triple(ans._sign, ans._int+'0'*expdiff,
2380 context._raise_error(Overflow, 'above Emax', ans._sign)
2413 return _dec_from_triple(dup._sign, '0', 0)
2420 return _dec_from_triple(dup._sign, dup._int[:end], exp)
2461 ans = _dec_from_triple(self._sign, '0', exp._exp)
2522 return _dec_from_triple(self._sign, '0', exp)
2526 return _dec_from_triple(self._sign,
2533 self = _dec_from_triple(self._sign, '1', exp-1)
2540 return _dec_from_triple(self._sign, coeff, exp)
2583 return _dec_from_triple(self._sign, '0', 0)
2623 if self._isinfinity() and self._sign == 0:
2628 ans = _dec_from_triple(self._sign, '0', self._exp // 2)
2631 if self._sign == 1:
2841 if self._sign and not other._sign:
2843 if not self._sign and other._sign:
2845 sign = self._sign
2921 if self._sign:
2929 return _dec_from_triple(other._sign, self._int,
2967 if self._sign == 0 and adj > len(str((context.Emax+1)*3)):
2970 elif self._sign == 1 and adj > len(str((-context.Etiny()+1)*3)):
2973 elif self._sign == 0 and adj < -p:
2976 elif self._sign == 1 and adj < -p-1:
3045 return self._sign == 1
3112 if self._sign == 1:
3188 _sign == 1:
3256 if self._sign != 0 or self._exp != 0:
3471 ans._sign)
3511 if self._sign:
3518 if self._sign:
3523 if self._sign:
3562 return _dec_from_triple(self._sign,
3586 d = _dec_from_triple(self._sign, self._int, self._exp + int(other))
3625 return _dec_from_triple(self._sign,
3666 sign = _format_sign(self._sign, spec)
3676 self = _dec_from_triple(self._sign, self._int, self._exp+2)
3722 return _format_number(self._sign, intpart, fracpart, exp, spec)
3733 self._sign = sign
5430 self.sign = value._sign