diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/sqrt.c | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -8,6 +8,7 @@ Changes in version 0.8.3: - Bug fixes: - trigonometric functions: infinite loop due to overflow for large arguments - exp: close to infinite loop for argument close to 0 + - sqrt: close to infinite loop for argument close to 1 - Minimally required library versions: gmp 4.3.2, mpfr 2.4.2 Changes in version 0.8.2: @@ -21,6 +21,13 @@ MA 02111-1307, USA. */ #include "mpc-impl.h" +#if MPFR_VERSION_MAJOR < 3 +#define mpfr_min_prec(x) \ + ( ((prec + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB) * BITS_PER_MP_LIMB \ + - mpn_scan1 (x->_mpfr_d, 0)) +#endif + + int mpc_sqrt (mpc_ptr a, mpc_srcptr b, mpc_rnd_t rnd) { |