diff --git a/src/fq_nmod_mpoly_factor/factor.c b/src/fq_nmod_mpoly_factor/factor.c index 4180a26b42..8175e18b1d 100644 --- a/src/fq_nmod_mpoly_factor/factor.c +++ b/src/fq_nmod_mpoly_factor/factor.c @@ -369,6 +369,7 @@ static int _factor_irred_compressed( fq_nmod_mpoly_get_n_fq_bpoly(Ab, A, perm[0], perm[1], ctx); success = n_fq_bpoly_factor_smprime(c, Abf, Ab, 1, ctx->fqctx); + if (!success) { fq_nmod_mpoly_get_n_fq_bpoly(Ab, A, perm[0], perm[1], ctx); diff --git a/src/fq_nmod_mpoly_factor/test/t-factor.c b/src/fq_nmod_mpoly_factor/test/t-factor.c index 82bb654bcd..f2597a5d60 100644 --- a/src/fq_nmod_mpoly_factor/test/t-factor.c +++ b/src/fq_nmod_mpoly_factor/test/t-factor.c @@ -82,7 +82,7 @@ void check_omega(slong lower, slong upper, const fq_nmod_mpoly_t p, const fq_nmo int main(void) { - slong i, j, tmul = 20; + slong i, j, tmul = 40; FLINT_TEST_INIT(state); flint_printf("factor...."); @@ -96,7 +96,11 @@ main(void) slong n, nfacs, len; ulong expbound, powbound, pow; - fq_nmod_mpoly_ctx_init_rand(ctx, state, 7, FLINT_BITS, 4); + if (i % 2 == 0) + fq_nmod_mpoly_ctx_init_rand(ctx, state, 7, 1 + n_randint(state, FLINT_BITS), 4); + else + fq_nmod_mpoly_ctx_init_rand(ctx, state, 2, 3, 1); + fq_nmod_mpoly_init(a, ctx); fq_nmod_mpoly_init(t, ctx);