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

Lines Matching refs:quantize

2422     def quantize(self, exp, rounding=None, context=None, watchexp=True):
2423 """Quantize self so its exponent is the same as that of exp.
2443 'quantize with one INF')
2458 'target exponent out of bounds in quantize')
2467 'exponent of quantize result too large for current context')
2470 'quantize result has too many digits for current context')
2475 'exponent of quantize result too large for current context')
2478 'quantize result has too many digits for current context')
5045 def quantize(self, a, b):
5055 quantize operation would be greater than precision then an Invalid
5057 an error condition, the exponent of the result of a quantize is always
5060 Also unlike other operations, quantize
5063 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001'))
5065 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01'))
5067 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1'))
5069 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0'))
5071 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1'))
5073 >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity'))
5075 >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity'))
5077 >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1'))
5079 >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5'))
5081 >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2'))
5083 >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2'))
5085 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1'))
5087 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0'))
5089 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1'))
5091 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2'))
5093 >>> ExtendedContext.quantize(1, 2)
5095 >>> ExtendedContext.quantize(Decimal(1), 2)
5097 >>> ExtendedContext.quantize(1, Decimal(2))
5101 return a.quantize(b, context=self)
5360 as using the quantize() operation using the given operand as the
5390 as using the quantize() operation using the given operand as the