[issue11128] decimal.py: to_integral() corner cases

2011-02-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: For the record, I prefer Python's behavior. The quantize() definition does not work well for arbitrary precision input and leads to situations like: Precision: 1 Maxexponent: 1 Minexponent: -1 tointegral 101 - 101 tointegral 101.0

[issue11128] decimal.py: to_integral() corner cases

2011-02-05 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: Hi, to_integral() should behave like quantize() for negative exponents: Otherwise (the operand has a negative exponent) the result is the same as using the quantize operation using the given operand as the left-hand-operand, 1E+0 as