Tim Peters <t...@python.org> added the comment:
[Mark] > def risqrt(n): > return (isqrt(n<<2) + 1) >> 1 Sweet! New one on me - did you invent this? It's slick :-) I'd be happy to see recipes added to the docs for rounded and ceiling flavors of isqrt, but am dubious about the value of building them in. If they are added via an optional rounding argument, can we use the decimal module's names for the supported rounding modes? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46187> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com