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

Lines Matching full:_exp

509     __slots__ = ('_exp','_int','_sign', '_is_special')
511 # (-1)**_sign * _int * 10**_exp
560 self._exp = exp - len(fracpart)
568 self._exp = 'N'
570 self._exp = 'n'
574 self._exp = 'F'
584 self._exp = 0
591 self._exp = value._exp
601 self._exp = int(value.exp)
620 self._exp = value[2]
637 self._exp = value[2]
642 self._exp = value[2]
652 self._exp = value._exp
708 exp = self._exp
722 if self._exp == 'F':
834 self_padded = self._int + '0'*(self._exp - other._exp)
835 other_padded = other._int + '0'*(other._exp - self._exp)
984 self._exp+len(self._int),
992 return DecimalTuple(self._sign, tuple(map(int, self._int)), self._exp)
1007 if self._exp == 'F':
1009 elif self._exp == 'n':
1011 else: # self._exp == 'N'
1015 leftdigits = self._exp + len(self._int)
1020 if self._exp <= 0 and leftdigits > -6:
1151 exp = min(self._exp, other._exp)
1165 exp = max(exp, other._exp - context.prec-1)
1170 exp = max(exp, self._exp - context.prec-1)
1265 resultexp = self._exp + other._exp
1326 exp = self._exp - other._exp
1331 exp = self._exp - other._exp - shift
1344 ideal_exp = self._exp - other._exp
1360 ideal_exp = self._exp
1362 ideal_exp = min(self._exp, other._exp)
1505 ideal_exponent = min(self._exp, other._exp)
1600 if self._exp >= 0:
1601 return s*int(self._int)*10**self._exp
1603 return s*int(self._int[:self._exp] or '0')
1637 return _dec_from_triple(self._sign, payload, self._exp, True)
1664 new_exp = min(max(self._exp, Etiny), exp_max)
1665 if new_exp != self._exp:
1673 exp_min = len(self._int) + self._exp - context.prec
1686 if self._exp < exp_min:
1687 digits = len(self._int) + self._exp - exp_min
1724 if context._clamp == 1 and self._exp > Etop:
1726 self_padded = self._int + '0'*(self._exp - Etop)
1827 if self._exp == 'N':
1829 if other._exp == 'N':
1831 if self._exp == 'n':
1833 elif other._exp == 'n':
1835 elif self._exp == 'F':
1840 elif other._exp == 'F':
1848 self._exp + other._exp)
1948 nonzero. For efficiency, other._exp should not be too large,
1949 so that 10**abs(other._exp) is a feasible calculation."""
2022 ideal_exponent = self._exp*int(other)
2168 ideal_exponent = self._exp*int(other)
2254 # exp = max(self._exp*max(int(other), 0),
2265 exp = self._exp * multiplier
2315 ans = _dec_from_triple(1, ans._int, ans._exp)
2358 ans._exp-expdiff)
2416 exp = dup._exp
2425 Similar to self._rescale(exp._exp) but with error checking.
2447 ans = self._rescale(exp._exp, rounding)
2449 if ans._exp > self._exp:
2455 # exp._exp should be between Etiny and Emax
2456 if not (context.Etiny() <= exp._exp <= context.Emax):
2461 ans = _dec_from_triple(self._sign, '0', exp._exp)
2468 if self_adjusted - exp._exp + 1 > context.prec:
2472 ans = self._rescale(exp._exp, rounding)
2483 if ans._exp > self._exp:
2506 return self._exp == other._exp
2524 if self._exp >= exp:
2527 self._int + '0'*(self._exp - exp), exp)
2531 digits = len(self._int) + self._exp - exp
2580 if self._exp >= 0:
2605 if self._exp >= 0:
2627 # exponent = self._exp // 2. sqrt(-0) = -0
2628 ans = _dec_from_triple(self._sign, '0', self._exp // 2)
2656 # write argument in the form c*100**e where e = self._exp//2
2792 if self._exp >= 0:
2794 rest = self._int[self._exp:]
2799 if not self or self._exp > 0:
2801 return self._int[-1+self._exp] in '02468'
2806 return self._exp + len(self._int) - 1
2807 # If NaN or Infinity, self._exp is string
2891 if self._exp < other._exp:
2896 if self._exp > other._exp:
2917 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2922 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2924 return _dec_from_triple(1, self._int, self._exp, self._is_special)
2930 self._exp, self._is_special)
3025 return self._exp == 'F'
3029 return self._exp in ('n', 'N')
3041 return self._exp == 'n'
3049 return self._exp == 'N'
3070 adj = self._exp + len(self._int) - 1
3150 adj = self._exp + len(self._int) - 1
3195 ans = Decimal(self._exp + len(self._int) - 1)
3256 if self._sign != 0 or self._exp != 0:
3543 if other._exp != 0:
3563 rotated.lstrip('0') or '0', self._exp)
3576 if other._exp != 0:
3586 d = _dec_from_triple(self._sign, self._int, self._exp + int(other))
3601 if other._exp != 0:
3626 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
5432 self.exp = value._exp