[issue36887] Add integer square root, math.isqrt

Mark Dickinson report at bugs.python.org
Sat May 11 10:40:06 EDT 2019


Mark Dickinson <dickinsm at gmail.com> added the comment:

> for the smallest int `a` satisfying `a * a >= n`

I'd spell that as `1 + isqrt(n - 1)`. I'd prefer to keep things simple and just add the one building block, rather than adding multiple variants.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36887>
_______________________________________


More information about the Python-bugs-list mailing list