Tim Peters <t...@python.org> added the comment:
+1 from me! I'm tired of re-inventing this too :-) Agree with every point Mark made. Just in passing, noting a triviality: for the ceiling, `1 + isqrt(n - 1)` fails when `n` is zero. But I've never had a use for the ceiling here, or for "nearest" - just the floor. Also for `iroot(n, k)` for k'th root floors with k > 2, but that too can wait. ---------- nosy: +tim.peters _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36887> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com