Lines Matching refs:quantize

1873         self.quantize(Decimal('1En')).
1888 # two-argument form: use the equivalent quantize call
1892 return self.quantize(exp)
2546 def quantize(self, exp, rounding=None, context=None):
2567 'quantize with one INF')
2572 'target exponent out of bounds in quantize')
2581 'exponent of quantize result too large for current context')
2584 'quantize result has too many digits for current context')
2589 'exponent of quantize result too large for current context')
2592 'quantize result has too many digits for current context')
5235 def quantize(self, a, b):
5245 quantize operation would be greater than precision then an Invalid
5247 an error condition, the exponent of the result of a quantize is always
5250 Also unlike other operations, quantize will never raise Underflow, even
5253 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001'))
5255 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01'))
5257 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1'))
5259 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0'))
5261 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1'))
5263 >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity'))
5265 >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity'))
5267 >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1'))
5269 >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5'))
5271 >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2'))
5273 >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2'))
5275 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1'))
5277 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0'))
5279 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1'))
5281 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2'))
5283 >>> ExtendedContext.quantize(1, 2)
5285 >>> ExtendedContext.quantize(Decimal(1), 2)
5287 >>> ExtendedContext.quantize(1, Decimal(2))
5291 return a.quantize(b, context=self)
5570 as using the quantize() operation using the given operand as the
5600 as using the quantize() operation using the given operand as the