Skip to content

Commit

Permalink
Merge pull request #2086 from albinahlback/fix_fq_default
Browse files Browse the repository at this point in the history
Fix fq_default
  • Loading branch information
albinahlback authored Oct 10, 2024
2 parents 21d9cac + 87af14d commit 287803b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/fq_default/ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,12 @@ void fq_default_ctx_init_randtest(fq_default_ctx_t ctx, flint_rand_t state)
{
fmpz_t prime;
slong deg;
int type;

/* Select a context type [1,...,5] */
int ctx_type = 1 + n_randint(state, 5);
switch (ctx_type)
fmpz_init(prime);
type = 1 + n_randint(state, 5);

switch (type)
{
/* Create GF(p^d) for FQ_ZECH context */
case FQ_DEFAULT_FQ_ZECH:
Expand Down Expand Up @@ -237,5 +239,7 @@ void fq_default_ctx_init_randtest(fq_default_ctx_t ctx, flint_rand_t state)
break;
default: FLINT_UNREACHABLE;
}
fq_default_ctx_init_type(ctx, prime, deg, "a", ctx_type);

fq_default_ctx_init_type(ctx, prime, deg, "a", type);
fmpz_clear(prime);
}

0 comments on commit 287803b

Please sign in to comment.