Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up HeckeMiscInteger.jl #1848

Merged
merged 12 commits into from
Sep 20, 2024
255 changes: 0 additions & 255 deletions src/HeckeMiscInteger.jl

This file was deleted.

26 changes: 0 additions & 26 deletions src/HeckeMoreStuff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -677,24 +677,6 @@ function divexact(a::ZZModRingElem, y::ZZRingElem; check::Bool=true)
return divexact(a, parent(a)(y), check=check)
end

function ^(a::ResElem, f::ZZRingElem)
f == 0 && return one(parent(a))
f == 1 && return a
if f < 0
f = -f
a = inv(a)
end
if f < (1 << 30)
return a^Int(f)
end
b = a^(div(f, 2))
b = b^2
if isodd(f)
b *= a
end
return b
end

characteristic(F::EuclideanRingResidueField{ZZRingElem}) = abs(F.modulus)

#@doc raw"""
Expand Down Expand Up @@ -998,14 +980,6 @@ function mod_sym!(a::T, b::T) where {T}
return mod!(a, b)
end

function mod_sym!(a::ZZRingElem, b::ZZRingElem)
mod!(a, a, b)
if a > div(b, 2)
sub!(a, a, b)
end
return a
end

Base.replace!(::typeof(-), m::ZZMatrix) = -m

function (A::AbsSimpleNumField)(a::ZZPolyRingElem)
Expand Down
1 change: 0 additions & 1 deletion src/Nemo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ include("matrix.jl")
include("Infinity.jl")

include("HeckeMiscFiniteField.jl")
include("HeckeMiscInteger.jl")
include("HeckeMiscMatrix.jl")
include("HeckeMiscPoly.jl")
include("HeckeMoreStuff.jl")
Expand Down
2 changes: 2 additions & 0 deletions src/flint/fmpq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,8 @@ function BigFloat(a::QQFieldElem)
return r
end

Float64(a::QQFieldElem) = Float64(BigFloat(a))

###############################################################################
#
# Convenience methods for arithmetics (since `QQFieldElem` and `ZZRingElem` are not `Number` types)
Expand Down
Loading
Loading