Home | History | Annotate | Download | only in Lib

Lines Matching full:_exp

508     __slots__ = ('_exp','_int','_sign', '_is_special')
510 # (-1)**_sign * _int * 10**_exp
559 self._exp = exp - len(fracpart)
567 self._exp = 'N'
569 self._exp = 'n'
573 self._exp = 'F'
583 self._exp = 0
590 self._exp = value._exp
600 self._exp = int(value.exp)
619 self._exp = value[2]
636 self._exp = value[2]
641 self._exp = value[2]
651 self._exp = value._exp
707 exp = self._exp
721 if self._exp == 'F':
833 self_padded = self._int + '0'*(self._exp - other._exp)
834 other_padded = other._int + '0'*(other._exp - self._exp)
983 self._exp+len(self._int),
991 return DecimalTuple(self._sign, tuple(map(int, self._int)), self._exp)
1006 if self._exp == 'F':
1008 elif self._exp == 'n':
1010 else: # self._exp == 'N'
1014 leftdigits = self._exp + len(self._int)
1019 if self._exp <= 0 and leftdigits > -6:
1149 exp = min(self._exp, other._exp)
1163 exp = max(exp, other._exp - context.prec-1)
1168 exp = max(exp, self._exp - context.prec-1)
1263 resultexp = self._exp + other._exp
1324 exp = self._exp - other._exp
1329 exp = self._exp - other._exp - shift
1342 ideal_exp = self._exp - other._exp
1358 ideal_exp = self._exp
1360 ideal_exp = min(self._exp, other._exp)
1503 ideal_exponent = min(self._exp, other._exp)
1598 if self._exp >= 0:
1599 return s*int(self._int)*10**self._exp
1601 return s*int(self._int[:self._exp] or '0')
1635 return _dec_from_triple(self._sign, payload, self._exp, True)
1662 new_exp = min(max(self._exp, Etiny), exp_max)
1663 if new_exp != self._exp:
1671 exp_min = len(self._int) + self._exp - context.prec
1684 if self._exp < exp_min:
1685 digits = len(self._int) + self._exp - exp_min
1722 if context._clamp == 1 and self._exp > Etop:
1724 self_padded = self._int + '0'*(self._exp - Etop)
1825 if self._exp == 'N':
1827 if other._exp == 'N':
1829 if self._exp == 'n':
1831 elif other._exp == 'n':
1833 elif self._exp == 'F':
1838 elif other._exp == 'F':
1846 self._exp + other._exp)
1946 nonzero. For efficiency, other._exp should not be too large,
1947 so that 10**abs(other._exp) is a feasible calculation."""
2020 ideal_exponent = self._exp*int(other)
2166 ideal_exponent = self._exp*int(other)
2252 # exp = max(self._exp*max(int(other), 0),
2263 exp = self._exp * multiplier
2313 ans = _dec_from_triple(1, ans._int, ans._exp)
2356 ans._exp-expdiff)
2414 exp = dup._exp
2423 Similar to self._rescale(exp._exp) but with error checking.
2445 ans = self._rescale(exp._exp, rounding)
2447 if ans._exp > self._exp:
2453 # exp._exp should be between Etiny and Emax
2454 if not (context.Etiny() <= exp._exp <= context.Emax):
2459 ans = _dec_from_triple(self._sign, '0', exp._exp)
2466 if self_adjusted - exp._exp + 1 > context.prec:
2470 ans = self._rescale(exp._exp, rounding)
2481 if ans._exp > self._exp:
2504 return self._exp == other._exp
2522 if self._exp >= exp:
2525 self._int + '0'*(self._exp - exp), exp)
2529 digits = len(self._int) + self._exp - exp
2578 if self._exp >= 0:
2603 if self._exp >= 0:
2625 # exponent = self._exp // 2. sqrt(-0) = -0
2626 ans = _dec_from_triple(self._sign, '0', self._exp // 2)
2654 # write argument in the form c*100**e where e = self._exp//2
2790 if self._exp >= 0:
2792 rest = self._int[self._exp:]
2797 if not self or self._exp > 0:
2799 return self._int[-1+self._exp] in '02468'
2804 return self._exp + len(self._int) - 1
2805 # If NaN or Infinity, self._exp is string
2889 if self._exp < other._exp:
2894 if self._exp > other._exp:
2915 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2920 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2922 return _dec_from_triple(1, self._int, self._exp, self._is_special)
2928 self._exp, self._is_special)
3023 return self._exp == 'F'
3027 return self._exp in ('n', 'N')
3039 return self._exp == 'n'
3047 return self._exp == 'N'
3068 adj = self._exp + len(self._int) - 1
3148 adj = self._exp + len(self._int) - 1
3193 ans = Decimal(self._exp + len(self._int) - 1)
3254 if self._sign != 0 or self._exp != 0:
3541 if other._exp != 0:
3561 rotated.lstrip('0') or '0', self._exp)
3574 if other._exp != 0:
3584 d = _dec_from_triple(self._sign, self._int, self._exp + int(other))
3599 if other._exp != 0:
3624 shifted.lstrip('0') or '0', self._exp)
3676 self = _dec_from_triple(self._sign, self._int, self._exp+2)
3690 if not self and self._exp > 0 and spec['type'] in 'fF%':
3694 leftdigits = self._exp + len(self._int)
3703 if self._exp <= 0 and leftdigits > -6:
3735 self._exp = exponent
5452 self.exp = value._exp