Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Is i, rem = isqrt_rem(n) i + (rem != 0) better than (isqrt(n<<2) + 1) >> 1 or n and isqrt(n-1) + 1 ? As for use cases, there were few cases in my experience when I needed the ceiling square root, mostly in simple experiments in REPL, but it was so rary, and workarounds satisfied me. So it would be a nice to have feature which I would use perhaps once in a year or two years, but can live without it. And I do not want to pay a cost of significantly complicating API or slowing down isqrt(). ---------- nosy: +serhiy.storchaka _______________________________________ 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