Commit 3f662e89 authored by Peter Bruin's avatar Peter Bruin

fix bug in curve_random_prime_divisor

parent 6fdf08fb
......@@ -391,14 +391,12 @@ curve_random_prime_divisor (GEN X, unsigned long n, unsigned long d) {
P = curve_divide_subspaces(X, P, i + 1, IGS, a);
} else if (d > i + 1) {
int a = d - i - 1;
GEN IGS = (a <= curve_max_IGS_V (X)) ? curve_IGS_V (X, a)
: curve_V (X, a);
P = curve_multiply_subspaces(X, IGS, P);
P = curve_multiply_subspaces(X, curve_V(X, a), P);
}
if (lg (curve_V (X, d)) - lg (P) != n)
pari_err (e_MISC, "bug in curve_random_prime_divisor");
return gerepileupto (av, P);
return gerepilecopy(av, P);
}
/*
......@@ -574,7 +572,7 @@ curve_random_divisor_fast (GEN X, unsigned long n, unsigned long d) {
*/
i = ceil (((float) n) / ((float) curve_degree (X)));
err_printf("finding prime divisor of degree %li using hypersurface of degree %i\n", n, i);
err_printf("finding divisor of degree %li using hypersurface of degree %i\n", n, i);
if (curve_max_V (X) < 2 * i + 2)
pari_err (e_MISC, "divisor of too large degree requested");
......
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