[issue36887] Add integer square root, math.isqrt

Steven D'Aprano report at bugs.python.org
Sun May 12 00:41:05 EDT 2019


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Yes please for this!

The two usual versions are isqrt and nsqrt:

isqrt(n) = largest integer ≤ √n

nsqrt(n) = closest integer to √n

although to be honest I'm not sure what use cases there are for nsqrt.

----------
nosy: +steven.daprano

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


More information about the Python-bugs-list mailing list