Commit 8abfafa9 authored by Peter Bruin's avatar Peter Bruin

avoid infinite loop in curve_divisor_algebra

parent 3e77f074
......@@ -140,7 +140,7 @@ curve_divisor_algebra (GEN X, GEN W_D, GEN W_2_D,
if (try_monogenic) {
GEN s, t, M, N, A = NULL, v;
int done = 0;
int done = 0, j;
while (!done) {
if (A == NULL) {
C = matsmall_random_subspace(V, deg_D, 0, p, T);
......@@ -153,7 +153,7 @@ curve_divisor_algebra (GEN X, GEN W_D, GEN W_2_D,
if (A == NULL)
continue;
algebra = matsmall_charpoly(A, 0, p, T);
while (1) {
for (j = 0; j < 16; j++) {
basis = cgetg(deg_D + 1, t_MAT);
v = matsmall_random(deg_D, 1, p, T);
gel(basis, 1) = gel(v, 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment