From 9405a0d16b9845b66cbb05206429f27b6ebc5779 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Thu, 27 Jul 2023 09:31:44 +0200 Subject: [PATCH 1/5] Fix #1514 (#1515) --- src/Nemo.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Nemo.jl b/src/Nemo.jl index 995802988..9b06c7755 100644 --- a/src/Nemo.jl +++ b/src/Nemo.jl @@ -107,8 +107,8 @@ end # check whether we are using flint version >= 3.0 (or some recent enough dev version), # which changed the layout of some structs -_ptr = Libc.dlopen(libflint) -if Libc.dlsym(_ptr, :_fmpz_mod_vec_set_fmpz_vec_threaded; throw_error = false) !== nothing +_ptr = Libc.Libdl.dlopen(libflint) +if Libc.Libdl.dlsym(_ptr, :_fmpz_mod_vec_set_fmpz_vec_threaded; throw_error = false) !== nothing const NEW_FLINT = true libantic = libflint libarb = libflint @@ -116,7 +116,7 @@ if Libc.dlsym(_ptr, :_fmpz_mod_vec_set_fmpz_vec_threaded; throw_error = false) ! else const NEW_FLINT = false end -Libc.dlclose(_ptr) +Libc.Libdl.dlclose(_ptr) ################################################################################ # From 9a4c9971057e86501fd3ac52c2eef46a100a90b6 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Thu, 27 Jul 2023 13:42:40 +0200 Subject: [PATCH 2/5] Clean up #1515 (#1516) --- src/Nemo.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Nemo.jl b/src/Nemo.jl index 9b06c7755..e30a9ddab 100644 --- a/src/Nemo.jl +++ b/src/Nemo.jl @@ -107,8 +107,8 @@ end # check whether we are using flint version >= 3.0 (or some recent enough dev version), # which changed the layout of some structs -_ptr = Libc.Libdl.dlopen(libflint) -if Libc.Libdl.dlsym(_ptr, :_fmpz_mod_vec_set_fmpz_vec_threaded; throw_error = false) !== nothing +_ptr = Libdl.dlopen(libflint) +if Libdl.dlsym(_ptr, :_fmpz_mod_vec_set_fmpz_vec_threaded; throw_error = false) !== nothing const NEW_FLINT = true libantic = libflint libarb = libflint @@ -116,7 +116,7 @@ if Libc.Libdl.dlsym(_ptr, :_fmpz_mod_vec_set_fmpz_vec_threaded; throw_error = fa else const NEW_FLINT = false end -Libc.Libdl.dlclose(_ptr) +Libdl.dlclose(_ptr) ################################################################################ # From 1048bb3d023c63819772cfc4e909048c963c4653 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Thu, 27 Jul 2023 14:25:23 +0200 Subject: [PATCH 3/5] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d2ba159df..298b2b4a4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Nemo" uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a" -version = "0.35.1" +version = "0.35.2" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" From bd2300b11a432f9ec83a69f69c788f3f9e830321 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Thu, 27 Jul 2023 17:52:46 +0200 Subject: [PATCH 4/5] Add is_power for all finite fields (#1517) --- Project.toml | 2 +- src/HeckeMiscPoly.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 298b2b4a4..90da51e47 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Nemo" uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a" -version = "0.35.2" +version = "0.35.3" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" diff --git a/src/HeckeMiscPoly.jl b/src/HeckeMiscPoly.jl index 7cecbf2c4..28033a7eb 100644 --- a/src/HeckeMiscPoly.jl +++ b/src/HeckeMiscPoly.jl @@ -239,7 +239,7 @@ function roots(K::FqPolyRepField, f::FpPolyRingElem) return roots(ff) end -function is_power(a::Union{fqPolyRepFieldElem,FqPolyRepFieldElem,FqFieldElem}, m::Int) +function is_power(a::Union{fpField, FpFieldElem, fqPolyRepFieldElem,FqPolyRepFieldElem,FqFieldElem}, m::Int) if iszero(a) return true, a end From 38fd074064f549c7a95da4626db967abdc2c3a40 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Thu, 27 Jul 2023 18:53:33 +0200 Subject: [PATCH 5/5] Restore old is_squarefree behavior (#1518) --- src/HeckeMiscPoly.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/HeckeMiscPoly.jl b/src/HeckeMiscPoly.jl index 28033a7eb..695e0d256 100644 --- a/src/HeckeMiscPoly.jl +++ b/src/HeckeMiscPoly.jl @@ -537,6 +537,9 @@ function is_squarefree(f::PolyElem{<:FieldElement}) end function is_squarefree(f::PolyElem{<:RingElement}) + if iszero(f) + return true + end fac = factor_squarefree(f) return all(e <= 1 for (_, e) in fac) end