Skip to content
Snippets Groups Projects
Commit ee76ef3c authored by Krueger Jasmin's avatar Krueger Jasmin
Browse files

update s and t in Hensel validation

parent 103b0117
No related branches found
No related tags found
No related merge requests found
...@@ -364,6 +364,7 @@ function hensel_validate(l::Int, f::PolyElem, g::PolyElem, h::PolyElem; ϵ=1e-10 ...@@ -364,6 +364,7 @@ function hensel_validate(l::Int, f::PolyElem, g::PolyElem, h::PolyElem; ϵ=1e-10
dg = degree(g) dg = degree(g)
dh = degree(h) dh = degree(h)
df = degree(f) df = degree(f)
@show dg @show dg
@show dh @show dh
...@@ -374,6 +375,8 @@ function hensel_validate(l::Int, f::PolyElem, g::PolyElem, h::PolyElem; ϵ=1e-10 ...@@ -374,6 +375,8 @@ function hensel_validate(l::Int, f::PolyElem, g::PolyElem, h::PolyElem; ϵ=1e-10
#compute Hensel with Float64 #compute Hensel with Float64
(g,h,s,t) = henseltruncate(l,fr,gr,hr) (g,h,s,t) = henseltruncate(l,fr,gr,hr)
#convert resulting polynomials to thin intervals #convert resulting polynomials to thin intervals
ds = degree(s)
dt = degree(t)
g = convert_float_to_balls(g) g = convert_float_to_balls(g)
h = convert_float_to_balls(h) h = convert_float_to_balls(h)
s = convert_float_to_balls(s) s = convert_float_to_balls(s)
...@@ -426,6 +429,18 @@ function hensel_validate(l::Int, f::PolyElem, g::PolyElem, h::PolyElem; ϵ=1e-10 ...@@ -426,6 +429,18 @@ function hensel_validate(l::Int, f::PolyElem, g::PolyElem, h::PolyElem; ϵ=1e-10
end end
g = gg g = gg
h = hh h = hh
#update the cofactors
b = s*g +t*h -1
BivPolMod!(b,l)
(c,d) = fastdivrem(s*b,h,l,validation = true)
s = s-d
s = truncate(s,ds+1)
BivPolMod!(s,l)
t = t-t*b-c*g
t = truncate(t,dt+1)
BivPolMod!(t,l)
end end
print("no convergence\n") print("no convergence\n")
(g,h) (g,h)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment