Vedran Čačić <ved...@gmail.com> added the comment: > use more digits to manage rounding in decimal base, not only one but more (i > should think better and experiment on how many)
You don't have to. It's infinitely many. :-P Think, how many decimal digits would you need to accurately round numbers to a closest third (one trinary digit)? Here are some decimal digits: 2.166666666. If the next digit is 5, then it rounds to 2.0. If it is 7, it rounds to 2.1 (base 3). If it is 6, you still don't know anything. It can go arbitrarily far. Of course, the probability is lower with every digit, and at some point it becomes acceptable (you said for yourself it's acceptable even with one extra digit), but it's not mathematically correct. And that one bit was just an illustration. In real life, 64-bit machines usually use at least 80-bit precision, so 16 extra bits. But it doesn't help your case, for the above reasons: this is simply not decimal rounding. ---------- _______________________________________ 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