aleaxit / gmpy

General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
https://gmpy2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
516 stars 86 forks source link

Add function csqrt #407

Closed daedalus closed 1 year ago

daedalus commented 1 year ago

Please, Add a function that computes ceil(sqrt(n)). Much appreciated.

skirpichev commented 1 year ago

The gmpy2 is a wrapper for GMP, MPFR and MPC libraries. I doubt that there exists some function, that corresponds to your proposal. Hence, I think it's better to reject it.

BTW, if you are interested in integer values of n - you could use the isqrt function.

daedalus commented 1 year ago

ok, thanks