On Thu, Sep 20, 2012 at 10:57 PM, M H <[email protected]> wrote: > Hello sympy group, > > I'm looking for a python function, perhaps named isqrt(), that can find the > truncated square root of an integer quickly. >
> Does sympy have a faster one somewhere? Thanks. sympy.mpmath.libmp.isqrt It's highly (as far as a pure Python implementation goes) optimized. See https://github.com/fredrik-johansson/mpmath/blob/master/mpmath/libmp/libintmath.py for the source code. Fredrik -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
