[issue32908] decimal ROUND_HALF_UP not according to spec for 9.95 to 10.0

2018-02-22 Thread Mark Dickinson
Mark Dickinson added the comment: This isn't a bug. When you do `Decimal(9.95)`, you're converting the binary floating-point number `9.95` to a `Decimal` instance. The conversion is performed exactly, with no change in the value. But the *input* to the conversion, the

[issue32908] decimal ROUND_HALF_UP not according to spec for 9.95 to 10.0

2018-02-22 Thread felix.engelmann
New submission from felix.engelmann : As described in https://www.python.org/dev/peps/pep-0327/#rounding-algorithms round-half-up: If the discarded digits represent greater than or equal to half (0.5) then the result should be incremented by 1; otherwise the discarded