Modified:
/trunk/mpmath/libmp/libintmath.py
=======================================
--- /trunk/mpmath/libmp/libintmath.py Sat Jan 8 15:52:03 2011
+++ /trunk/mpmath/libmp/libintmath.py Sun Jun 5 13:45:58 2011
@@ -298,8 +298,12 @@
sqrt_fixed2 = sqrt_fixed
if BACKEND == 'gmpy':
- isqrt_small = isqrt_fast = isqrt = gmpy.sqrt
- sqrtrem = gmpy.sqrtrem
+ if gmpy.version() >= '2':
+ isqrt_small = isqrt_fast = isqrt = gmpy.isqrt
+ sqrtrem = gmpy.isqrt_rem
+ else:
+ isqrt_small = isqrt_fast = isqrt = gmpy.sqrt
+ sqrtrem = gmpy.sqrtrem
elif BACKEND == 'sage':
isqrt_small = isqrt_fast = isqrt = \
getattr(sage_utils, "isqrt", lambda n: MPZ(n).isqrt())