From 9a2474ad6015da2a88feba176c954cab801ee712 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Mon, 30 Dec 2024 15:42:18 +0100 Subject: [PATCH] fix: limit memory for C2xC2 computations (#1714) --- ext/GAPExt/abelian_layer.jl | 2 +- src/FieldFactory/ab_exts.jl | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/GAPExt/abelian_layer.jl b/ext/GAPExt/abelian_layer.jl index f8e454a4c9..99e4b326a9 100644 --- a/ext/GAPExt/abelian_layer.jl +++ b/ext/GAPExt/abelian_layer.jl @@ -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" diff --git a/src/FieldFactory/ab_exts.jl b/src/FieldFactory/ab_exts.jl index 53e58fb722..71de84095b 100644 --- a/src/FieldFactory/ab_exts.jl +++ b/src/FieldFactory/ab_exts.jl @@ -754,7 +754,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 @@ -815,7 +814,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.