Vedran Čačić <ved...@gmail.com> added the comment: ROUND_HALF_UP is not chosen because it's popular, but because it's the best way to compensate for errors in representing decimal numbers by binary numbers.
Thinking that floats are decimal numbers is going to bite you anyway sooner or later. For example, would you expect (with your implementation) rnd(2.8-1.3) == rnd(1.8-1.3) ? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41598> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com