Skip to content

Commit 06bfc68

Browse files
committed
use negative evaluation points
1 parent 25dc3be commit 06bfc68

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/algorithms/param-curve.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ function rational_curve_parametrization(
9090
if i > 2*(DEG+2)
9191
error("Too many bad specializations: permute variables or use_lfs=true")
9292
end
93-
# Evaluation of the generator
94-
LFeval = Ideal.(_evalvar(F, N-1, QQ.(collect(i+j-1 for j in 1:length(free_ind)))))
93+
# Evaluation of the generator at values x s.t. 0 <= |x|-i <= length(free_ind)/2
94+
# plus one point at -(length(free_ind)+1)/2 if the length if odd.
95+
# This reduces a bit the bitsize of the evaluation
96+
curr_values = QQ.([-(i-1+(length(free_ind)+1)÷2):-i;i:(i-1+length(free_ind)÷2)])
97+
LFeval = Ideal.(_evalvar(F, N-1, curr_values))
9598
# Compute parametrization of each evaluation
9699
Lr = Vector{RationalParametrization}(undef, length(free_ind))
97100
for j in 1:length(free_ind)
@@ -111,7 +114,7 @@ function rational_curve_parametrization(
111114
rr = [ p*fact for p in vcat(Lr[j].elim, Lr[j].denom, Lr[j].param) ]
112115
end
113116
PARAM[j] = rr
114-
_values[j] = QQ(i+j-1)
117+
_values[j] = curr_values[j]
115118
used_ind[j] = true
116119
else
117120
info_level>0 && println("bad specialization: ", i+j-1)

0 commit comments

Comments
 (0)