Message412803
Decimal is a good question.
Why does floor division not do floor division on Decimal? The
documentation says
The integer division operator // behaves analogously, returning the
integer part of the true quotient (truncating towards zero) rather
than its floor, so as to preserve the usual identity
x == (x // y) * y + x % y
but it's not clear why that identity is more important than floor
division returning the floor.
I guess we could just document the difference and maybe add a
Decimal ceildiv method, although that makes me sad :-(
Could we "fix" Decimal? |
|
Date |
User |
Action |
Args |
2022-02-08 01:19:29 | steven.daprano | set | recipients:
+ steven.daprano, tim.peters, mark.dickinson, serhiy.storchaka, Nathaniel Manista, Vladimir Feinberg |
2022-02-08 01:19:29 | steven.daprano | link | issue46639 messages |
2022-02-08 01:19:29 | steven.daprano | create | |
|