|
|
|
|
|
by cm2187
1295 days ago
|
|
That's good to know and kind of dangerous. I have seen banking regulators getting upset in the past because of roundings not following the usual convention ("banker's rounding"). You will have a hard time explaining it's an unexpected behaviour of some programming language rather than the management of the bank trying to be cute with the numbers. |
|
That… is exactly the behaviour python implements, and what GP was surprised by…
It is also, incidentally, the IEEE 754 recommendation.
Python 2 used to round away from 0.