Skip to content

Commit

Permalink
fix (hopefully) spurious test failures for gamma_fmpq
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-johansson committed Sep 28, 2021
1 parent 928a2ec commit 450435a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions arb_hypgeom/gamma_fmpq.c
Expand Up @@ -529,22 +529,22 @@ arb_hypgeom_gamma_fmpq_outward(arb_t y, const fmpq_t x, slong prec)

if (q == 1 || q == 2 || q == 3 || q == 4 || q == 6)
{
arb_hypgeom_gamma_small_frac(t, p, q, prec);
arb_hypgeom_gamma_small_frac(t, p, q, prec + 4 * (m != 0));
}
else
{
arb_hypgeom_gamma_fmpq_hyp(t, a, prec);
arb_hypgeom_gamma_fmpq_hyp(t, a, prec + 4 * (m != 0));
}

/* argument reduction */
if (m >= 0)
{
arb_rising_fmpq_ui(u, a, m, prec);
arb_rising_fmpq_ui(u, a, m, prec + 4);
arb_mul(y, t, u, prec);
}
else
{
arb_rising_fmpq_ui(u, x, -m, prec);
arb_rising_fmpq_ui(u, x, -m, prec + 4);
arb_div(y, t, u, prec);
}

Expand Down Expand Up @@ -602,7 +602,7 @@ arb_hypgeom_gamma_fmpq_taylor(arb_t y, const fmpq_t x, slong prec)
}

arb_set_fmpq(t, a, prec + 4);
success = arb_hypgeom_gamma_taylor(t, t, 0, prec);
success = arb_hypgeom_gamma_taylor(t, t, 0, prec + 4);

if (success)
{
Expand All @@ -611,12 +611,12 @@ arb_hypgeom_gamma_fmpq_taylor(arb_t y, const fmpq_t x, slong prec)

if (m >= 0)
{
arb_rising_fmpq_ui(u, a, m, prec);
arb_rising_fmpq_ui(u, a, m, prec + 4);
arb_mul(y, t, u, prec);
}
else
{
arb_rising_fmpq_ui(u, x, -m, prec);
arb_rising_fmpq_ui(u, x, -m, prec + 4);
arb_div(y, t, u, prec);
}

Expand Down Expand Up @@ -684,7 +684,7 @@ arb_hypgeom_gamma_fmpq(arb_t y, const fmpq_t x, slong prec)
wp = (slong) fmpz_bits(fmpq_numref(x)) - (slong) fmpz_bits(fmpq_denref(x));
wp = FLINT_MAX(wp, 0);
wp = FLINT_MIN(wp, 4 * prec);
wp += prec;
wp += prec + 4;

arb_set_fmpq(y, x, wp);

Expand Down

0 comments on commit 450435a

Please sign in to comment.