Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fq_default #2086

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
Loading