Skip to content

Commit

Permalink
fix: limit memory for C2xC2 computations
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Dec 29, 2024
1 parent 8da5e59 commit b1f9a60
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion ext/GAPExt/abelian_layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function abelian_extensionsQQ(gtype::Vector{Int}, bound::ZZRingElem, only_real::
end
return res
end
if gtype == Int[2,2]
if gtype == Int[2,2] && bound < ZZ(10)^12 # otherwise the method needs to much memory
l = Hecke._C22_exts_abexts(Int(bound), only_real, unramified_outside = unramified_outside)
@vprintln :Fields 1 "Computing maximal orders"
@vprintln :FieldsNonFancy 1 "Computing maximal orders"
Expand Down
2 changes: 0 additions & 2 deletions src/FieldFactory/ab_exts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,6 @@ function _disc(a::Int, b::Int, c::Int, bound::Int)
end

function _pairs_totally_real(pairs, ls, bound)
#b1=floor(Int, Base.sqrt(bound))
b1 = isqrt(bound)
# We look for Q(sqrt{a},sqrt{b})
# Remove all with a = 1
Expand Down Expand Up @@ -818,7 +817,6 @@ end

function _find_pairs(bound::Int, only_real::Bool = false; unramified_outside::Vector{ZZRingElem} = ZZRingElem[] )
#first, we need the squarefree numbers
#b1=ceil(Int, Base.sqrt(bound))
b1 = isqrt(bound)
ls = squarefree_up_to(b1, prime_base = unramified_outside)
#The first step is to enumerate all the totally real extensions.
Expand Down

0 comments on commit b1f9a60

Please sign in to comment.