Lines Matching defs:quantize
1900 self.quantize(Decimal('1En')).
1915 # two-argument form: use the equivalent quantize call
1919 return self.quantize(exp)
2573 def quantize(self, exp, rounding=None, context=None):
2574 """Quantize self so its exponent is the same as that of exp.
2594 'quantize with one INF')
2599 'target exponent out of bounds in quantize')
2608 'exponent of quantize result too large for current context')
2611 'quantize result has too many digits for current context')
2616 'exponent of quantize result too large for current context')
2619 'quantize result has too many digits for current context')
5258 def quantize(self, a, b):
5268 quantize operation would be greater than precision then an Invalid
5270 an error condition, the exponent of the result of a quantize is always
5273 Also unlike other operations, quantize will never raise Underflow, even
5276 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001'))
5278 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01'))
5280 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1'))
5282 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0'))
5284 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1'))
5286 >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity'))
5288 >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity'))
5290 >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1'))
5292 >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5'))
5294 >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2'))
5296 >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2'))
5298 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1'))
5300 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0'))
5302 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1'))
5304 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2'))
5306 >>> ExtendedContext.quantize(1, 2)
5308 >>> ExtendedContext.quantize(Decimal(1), 2)
5310 >>> ExtendedContext.quantize(1, Decimal(2))
5314 return a.quantize(b, context=self)
5593 as using the quantize() operation using the given operand as the
5623 as using the quantize() operation using the given operand as the