summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--src/mpfr-gmp.h7
-rw-r--r--src/sqrt.c11
3 files changed, 3 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 938dbd2af..0297fae48 100644
--- a/configure.ac
+++ b/configure.ac
@@ -633,7 +633,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
)
LD_RUN_PATH="$saved_LD_RUN_PATH"
-dnl Warning! __gmpn_rootrem is an internal GMP symbol; thus its behavior
+dnl __gmpn_sbpi1_divappr_q is an internal GMP symbol; thus its behavior
dnl may change or this symbol may be removed in the future (without being
dnl handled by the library versioning system, which is even worse, as this
dnl can mean undetected incompatibilities in case of GMP library upgrade,
@@ -642,8 +642,7 @@ dnl WANT_GMP_INTERNALS is defined. Only the GMP public API should be used
dnl by default, in particular by binary distributions. Moreover the check
dnl below may yield an incorrect result as libtool isn't used in configure
dnl (see above).
-dnl Same for __gmpn_sbpi1_divappr_q.
-AC_CHECK_FUNCS([__gmpn_rootrem __gmpn_sbpi1_divappr_q])
+AC_CHECK_FUNCS([__gmpn_sbpi1_divappr_q])
MPFR_CHECK_MP_LIMB_T_VS_LONG
diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h
index dbed72267..519df4f20 100644
--- a/src/mpfr-gmp.h
+++ b/src/mpfr-gmp.h
@@ -271,13 +271,6 @@ __MPFR_DECLSPEC extern MPFR_THREAD_ATTR void * (*mpfr_allocate_func) _MPFR_PRO
__MPFR_DECLSPEC extern MPFR_THREAD_ATTR void * (*mpfr_reallocate_func) _MPFR_PROTO ((void *, size_t, size_t));
__MPFR_DECLSPEC extern MPFR_THREAD_ATTR void (*mpfr_free_func) _MPFR_PROTO ((void *, size_t));
-#if defined(WANT_GMP_INTERNALS) && defined(HAVE___GMPN_ROOTREM)
-#ifndef __gmpn_rootrem
- __MPFR_DECLSPEC mp_size_t __gmpn_rootrem _MPFR_PROTO ((mp_limb_t*,
- mp_limb_t*, mp_limb_t*, mp_size_t, mp_limb_t));
-#endif
-#endif
-
#if defined(WANT_GMP_INTERNALS) && defined(HAVE___GMPN_SBPI1_DIVAPPR_Q)
#ifndef __gmpn_sbpi1_divappr_q
__MPFR_DECLSPEC mp_limb_t __gmpn_sbpi1_divappr_q _MPFR_PROTO ((mp_limb_t*,
diff --git a/src/sqrt.c b/src/sqrt.c
index 3c56264ba..57ef54a35 100644
--- a/src/sqrt.c
+++ b/src/sqrt.c
@@ -133,16 +133,7 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mpfr_rnd_t rnd_mode)
/* sticky0 is non-zero iff the truncated part of the input is non-zero */
- /* for size above about 500 limbs, mpn_rootrem with NULL 2nd argument is
- faster than mpn_sqrtrem, thus use it if available and if the user asked
- to use GMP internal functions
- (https://gmplib.org/list-archives/gmp-devel/2010-September/001654.html) */
-#if defined(WANT_GMP_INTERNALS) && defined(HAVE___GMPN_ROOTREM)
- if (rrsize >= 500)
- tsize = __gmpn_rootrem (rp, NULL, sp, rrsize, 2);
- else
-#endif
- tsize = mpn_sqrtrem (rp, sp, sp, rrsize);
+ tsize = mpn_sqrtrem (rp, NULL, sp, rrsize);
/* a return value of zero in mpn_sqrtrem indicates a perfect square */
sticky = sticky0 || tsize != 0;