Skip to content

Commit 587aa9a

Browse files
committed
Fix allcoation issues for BigInts
Now, things do not give correct answers.
1 parent c2590c5 commit 587aa9a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/ControlledReduction.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,17 @@ function my_zero!(a::Vector{ZZRingElem})
137137
end
138138
end
139139

140+
function my_sub!(A,B,C)
141+
Oscar.Nemo.sub!(A,B,C)
142+
end
140143

144+
function my_sub!(A::ZZModMatrix,B::ZZModMatrix,C::ZZModMatrix)
145+
@ccall Oscar.Nemo.libflint.fmpz_mod_mat_add(A::Ref{ZZModMatrix},
146+
B::Ref{ZZModMatrix},
147+
C::Ref{ZZModMatrix},
148+
base_ring(B).ninv::Ref{Oscar.Nemo.fmpz_mod_ctx_struct})::Nothing
149+
return A
150+
end
141151

142152

143153
"""
@@ -747,7 +757,7 @@ function finitediff_prodeval_linear!(a,b,start,stop,g,temp,g_temp,ui=nothing)
747757
# right now, Fk = F(k+1)
748758

749759
# Fk = Fk - a
750-
sub!(temp,temp,a)
760+
my_sub!(temp,temp,a)
751761

752762
# now, Fk = F(k)
753763
#g = temp * g

0 commit comments

Comments
 (0)