diff --git a/arb_fpwrap/fpwrap.c b/arb_fpwrap/fpwrap.c index 0384cfa1..c3a714b2 100644 --- a/arb_fpwrap/fpwrap.c +++ b/arb_fpwrap/fpwrap.c @@ -590,7 +590,7 @@ int arb_fpwrap_double_4_int(double * res, arb_func_4_int func, double x1, double arb_set_d(arb_x1, x1); arb_set_d(arb_x2, x2); arb_set_d(arb_x3, x3); - arb_set_d(arb_x3, x4); + arb_set_d(arb_x4, x4); if (!arb_is_finite(arb_x1) || !arb_is_finite(arb_x2) || !arb_is_finite(arb_x3) || !arb_is_finite(arb_x4)) { diff --git a/arb_fpwrap/test/t-fpwrap.c b/arb_fpwrap/test/t-fpwrap.c index 4003d3ae..132c83a4 100644 --- a/arb_fpwrap/test/t-fpwrap.c +++ b/arb_fpwrap/test/t-fpwrap.c @@ -148,6 +148,26 @@ int main() } } + { + double y; + + arb_fpwrap_double_hypgeom_2f1(&y, 0.1, 0.2, 0.3, 0.4, 0, FPWRAP_CORRECT_ROUNDING); + + if (fabs(y - 1.0341794015503748492) > 1e-16) + { + flint_printf("FAIL: value 6\n\n"); + flint_abort(); + } + + arb_fpwrap_double_hypgeom_2f1(&y, 0.1, 0.2, 0.3, 0.4, 1, FPWRAP_CORRECT_ROUNDING); + + if (fabs(y - 0.34569799520143110351) > 1e-16) + { + flint_printf("FAIL: value 6\n\n"); + flint_abort(); + } + } + { double x, y, z; complex_double cx, cy, cz, ctau;