diff options
Diffstat (limited to 'src/jn.c')
-rw-r--r-- | src/jn.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -195,6 +195,8 @@ mpfr_jn (mpfr_ptr res, long n, mpfr_srcptr z, mpfr_rnd_t r) if (absn > 0) mpfr_div_2ui (t, t, absn, MPFR_RNDN); mpfr_set (s, t, MPFR_RNDN); + /* note: we assume here that the maximal error is proportional to + 2^exps, which is true also in the case where s=0 */ exps = MPFR_IS_ZERO (s) ? MPFR_EMIN_MIN : MPFR_GET_EXP (s); expT = exps; for (k = 1; ; k++) @@ -209,6 +211,7 @@ mpfr_jn (mpfr_ptr res, long n, mpfr_srcptr z, mpfr_rnd_t r) mpfr_div_ui (t, t, k, MPFR_RNDN); mpfr_div_ui (t, t, k + absn, MPFR_RNDN); } + /* see above note */ exps = MPFR_IS_ZERO (s) ? MPFR_EMIN_MIN : MPFR_GET_EXP (t); if (exps > expT) expT = exps; |