Bug report
Bug description:
importdecimalDecimal=decimal.DecimalDecimal('0.000005').quantize(Decimal('1.111111')) # Decimal('0.000005') correctDecimal('0.0000005').quantize(Decimal('1.1111111')) # Decimal('5E-7') wrongAccording to the documentation, https://docs.python.org/3/library/decimal.html#decimal.Decimal.quantize
quantize() should "Return a value equal to the first operand after rounding and having the exponent of the second operand."
Clearly, it is not respecting the exponent of the second operand, even if that exponent is given explicitly:
Decimal('0.0000005').quantize(Decimal('1.1111111e0')) # Decimal('5E-7') wrongCPython versions tested on:
3.13
Operating systems tested on:
Linux
Bug report
Bug description:
According to the documentation, https://docs.python.org/3/library/decimal.html#decimal.Decimal.quantize
quantize() should "Return a value equal to the first operand after rounding and having the exponent of the second operand."
Clearly, it is not respecting the exponent of the second operand, even if that exponent is given explicitly:
CPython versions tested on:
3.13
Operating systems tested on:
Linux