Lines Matching defs:abs
602 self._int = str(abs(value))
707 coeff = str(abs(f))
715 n, d = abs(f).as_integer_ratio()
1009 # Find n, d in lowest terms such that abs(self) == n / d;
1016 # Find d2, d5 such that abs(self) = n / (2**d2 * 5**d5).
1229 # OK, now abs(op1) > abs(op2)
1241 # Now, op1 > abs(op2) > 0
1512 Remainder nearest to 0- abs(remainder-near) <= other/2
1551 # expdiff >= prec+1 => abs(self/other) > 10**prec
1554 # expdiff <= -2 => abs(self/other) < 0.1
1568 # abs(remainder) <= abs(other)/2
2049 modulo = abs(int(modulo))
2073 so that 10**abs(other._exp) is a feasible calculation."""
2076 # value of other. Write x = xc*10**xe and abs(y) = yc*10**ye, with xc
2114 # if len(str(abs(yc*xe)) <= -ye then abs(yc*xe) < 10**-ye,
2116 # Similarly, len(str(abs(yc)*xc_bits)) <= -ye implies |y|
2240 if xe != 0 and len(str(abs(yc*xe))) <= -ye:
2243 if len(str(abs(yc)*xc_bits)) <= -ye:
3240 # assert len(str(abs(coeff)))-p >= 1
3241 if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
3244 ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
3321 # assert len(str(abs(coeff)))-p >= 1
3322 if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
3325 ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
4143 def abs(self, a):
4150 >>> ExtendedContext.abs(Decimal('2.1'))
4152 >>> ExtendedContext.abs(Decimal('-100'))
4154 >>> ExtendedContext.abs(Decimal('101.5'))
4156 >>> ExtendedContext.abs(Decimal('-101.5'))
4158 >>> ExtendedContext.abs(-1)
5703 str_n = str(abs(n))
5771 while (R <= L and abs(y) << L-R >= M or
5772 R > L and abs(y) >> R-L >= M):
5851 extra = len(str(abs(f)))-1
5990 b = len(str(abs(yc))) + ye