fix (not elegant) for fragile argument reduction in incomplete elliptic integrals

This commit is contained in:
fredrik 2018-10-24 22:36:30 +02:00
parent 512ada9674
commit eb60d7ac4e
3 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ acb_elliptic_e_inc(acb_t res, const acb_t phi, const acb_t m, int times_pi, slon
acb_zero(z);
arf_set_mag(arb_midref(acb_realref(z)), arb_radref(d));
mag_zero(arb_radref(d));
arb_sub(d, d, acb_realref(z), prec);
arb_sub(d, d, acb_realref(z), 2 * prec + 100); /* meant to be exact */
arb_floor(d, d, prec);
/* w = 2 E(m) */

View file

@ -127,7 +127,7 @@ acb_elliptic_f(acb_t res, const acb_t phi, const acb_t m, int times_pi, slong pr
acb_zero(z);
arf_set_mag(arb_midref(acb_realref(z)), arb_radref(d));
mag_zero(arb_radref(d));
arb_sub(d, d, acb_realref(z), prec);
arb_sub(d, d, acb_realref(z), 2 * prec + 100); /* meant to be exact */
arb_floor(d, d, prec);
/* w = 2 K(m) */

View file

@ -182,7 +182,7 @@ acb_elliptic_pi_inc(acb_t res, const acb_t n, const acb_t phi, const acb_t m, in
acb_zero(z);
arf_set_mag(arb_midref(acb_realref(z)), arb_radref(d));
mag_zero(arb_radref(d));
arb_sub(d, d, acb_realref(z), prec);
arb_sub(d, d, acb_realref(z), 2 * prec + 100); /* meant to be exact */
arb_floor(d, d, prec);
/* w = 2 Pi(n, m) */