Skip to content

RFC: redesign of the flint wrapper #2058

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/HeckeMoreStuff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function roots(f::ZZModPolyRingElem, fac::Fac{ZZRingElem})
res = fmpz_mod_poly_factor(base_ring(f))
_fac = fmpz_factor()
for (p, e) in fac
@ccall libflint._fmpz_factor_append(_fac::Ref{fmpz_factor}, p::Ref{ZZRingElem}, UInt(e)::UInt)::Nothing
@ccall libflint._fmpz_factor_append(_fac::Ref{fmpz_factor}, p::Ref{ZZRingElemRaw}, UInt(e)::UInt)::Nothing
end
@ccall libflint.fmpz_mod_poly_roots_factored(res::Ref{fmpz_mod_poly_factor}, f::Ref{ZZModPolyRingElem}, 1::Cint, _fac::Ref{fmpz_factor}, base_ring(f).ninv::Ref{fmpz_mod_ctx_struct})::Nothing
_res = Tuple{ZZModRingElem,Int}[]
Expand Down Expand Up @@ -274,7 +274,7 @@ end
#Assuming that the denominator of a is one, reduces all the coefficients modulo p
# non-symmetric (positive) residue system
function mod!(a::AbsSimpleNumFieldElem, b::ZZRingElem)
@ccall libflint.nf_elem_mod_fmpz(a::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, parent(a)::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_mod_fmpz(a::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, parent(a)::Ref{AbsSimpleNumField})::Nothing
return a
end

Expand All @@ -288,7 +288,7 @@ This function returns $b$.
function numerator(a::AbsSimpleNumFieldElem)
_one = one(ZZ)
z = deepcopy(a)
@ccall libflint.nf_elem_set_den(z::Ref{AbsSimpleNumFieldElem}, _one::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_set_den(z::Ref{AbsSimpleNumFieldElem}, _one::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return z
end

Expand Down Expand Up @@ -354,7 +354,7 @@ function invmod(f::ZZModPolyRingElem, M::ZZModPolyRingElem)
if !is_unit(f)
r = parent(f)()
ff = ZZ()
i = @ccall libflint.fmpz_mod_poly_invmod_f(ff::Ref{ZZRingElem}, r::Ref{ZZModPolyRingElem}, f::Ref{ZZModPolyRingElem}, M::Ref{ZZModPolyRingElem}, f.parent.base_ring.ninv::Ref{fmpz_mod_ctx_struct})::Int
i = @ccall libflint.fmpz_mod_poly_invmod_f(ff::Ref{ZZRingElemRaw}, r::Ref{ZZModPolyRingElem}, f::Ref{ZZModPolyRingElem}, M::Ref{ZZModPolyRingElem}, f.parent.base_ring.ninv::Ref{fmpz_mod_ctx_struct})::Int
if iszero(i)
error("not yet implemented")
else
Expand Down
14 changes: 7 additions & 7 deletions src/ZZMatrix-linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ function _induce_rational_reconstruction(a::ZZMatrix, b::ZZRingElem; error_toler
end
Nemo.set!(A_ptr, n)

a_ptr += sizeof(ZZRingElem)
A_ptr += sizeof(ZZRingElem)
a_ptr += sizeof(ZZRingElemRaw)
A_ptr += sizeof(ZZRingElemRaw)
end
end
end
Expand Down Expand Up @@ -498,7 +498,7 @@ function dixon_solve(D::DixonCtx, B::ZZMatrix; side::Symbol = :right, block::Int
map_entries!(Nemo.fpField(D.p, false), D.d_mod, d)

Nemo.mul!(D.y_mod, D.Ainv, D.d_mod)
ccall((:fmpz_mat_scalar_addmul_nmod_mat_fmpz, Nemo.libflint), Cvoid, (Ref{ZZMatrix}, Ref{fpMatrix}, Ref{ZZRingElem}), D.x, D.y_mod, ppow)
ccall((:fmpz_mat_scalar_addmul_nmod_mat_fmpz, Nemo.libflint), Cvoid, (Ref{ZZMatrix}, Ref{fpMatrix}, Ref{ZZRingElemRaw}), D.x, D.y_mod, ppow)

Nemo.mul!(ppow, ppow, D.p)

Expand Down Expand Up @@ -573,7 +573,7 @@ function dixon_solve(D::DixonCtx, B::ZZMatrix; side::Symbol = :right, block::Int
for j=1:n
y_ptr = Nemo.mat_entry_ptr(D.y_mod, j, 1)
addmul!(Ay_ptr, A_ptr, unsafe_load(y_ptr))
A_ptr += sizeof(ZZRingElem)
A_ptr += sizeof(ZZRingElemRaw)
end
sub!(d_ptr, d_ptr, Ay_ptr)
end
Expand Down Expand Up @@ -615,7 +615,7 @@ end
function induce_crt!(A::ZZMatrix, p::ZZRingElem, B::fpMatrix; signed::Bool = false)
#the second modulus is implicit in B: B.n

ccall((:fmpz_mat_CRT_ui, Nemo.libflint), Cvoid, (Ref{ZZMatrix}, Ref{ZZMatrix}, Ref{ZZRingElem}, Ref{fpMatrix}, Int), A, A, p, B, signed)
ccall((:fmpz_mat_CRT_ui, Nemo.libflint), Cvoid, (Ref{ZZMatrix}, Ref{ZZMatrix}, Ref{ZZRingElemRaw}, Ref{fpMatrix}, Int), A, A, p, B, signed)
Nemo.mul!(p, p, B.n)
return
end
Expand Down Expand Up @@ -759,8 +759,8 @@ function _renorm(U::ZZMatrix, m::ZZRingElem; start::Int = 1, last::Int = nrows(U
end


function mod_sym!(a::Ptr{ZZRingElem}, b::Ptr{ZZRingElem}, c::ZZRingElem, t::ZZRingElem = ZZ(0))
ccall((:fmpz_ndiv_qr, Nemo.libflint), Cvoid, (Ref{ZZRingElem}, Ptr{ZZRingElem}, Ptr{ZZRingElem}, Ref{ZZRingElem}), t, a, b, c)
function mod_sym!(a::Ptr{ZZRingElemRaw}, b::Ptr{ZZRingElemRaw}, c::ZZRingElem, t::ZZRingElem = ZZ(0))
ccall((:fmpz_ndiv_qr, Nemo.libflint), Cvoid, (Ref{ZZRingElemRaw}, Ptr{ZZRingElemRaw}, Ptr{ZZRingElemRaw}, Ref{ZZRingElemRaw}), t, a, b, c)
end

#add C into A[c:end, :]
Expand Down
36 changes: 18 additions & 18 deletions src/antic/nf_elem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ end

function num_coeff!(z::ZZRingElem, x::AbsSimpleNumFieldElem, n::Int)
n < 0 && throw(DomainError(n, "Index must be non-negative"))
@ccall libflint.nf_elem_get_coeff_fmpz(z::Ref{ZZRingElem}, x::Ref{AbsSimpleNumFieldElem}, n::Int, parent(x)::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_get_coeff_fmpz(z::Ref{ZZRingElemRaw}, x::Ref{AbsSimpleNumFieldElem}, n::Int, parent(x)::Ref{AbsSimpleNumField})::Nothing
return z
end

Expand Down Expand Up @@ -160,20 +160,20 @@ field element.
"""
function denominator(a::AbsSimpleNumFieldElem)
z = ZZRingElem()
@ccall libflint.nf_elem_get_den(z::Ref{ZZRingElem}, a::Ref{AbsSimpleNumFieldElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_get_den(z::Ref{ZZRingElemRaw}, a::Ref{AbsSimpleNumFieldElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
return z
end

function elem_from_mat_row(a::AbsSimpleNumField, b::ZZMatrix, i::Int, d::ZZRingElem)
_checkbounds(nrows(b), i) || throw(BoundsError())
ncols(b) == degree(a) || error("Wrong number of columns")
z = a()
@ccall libflint.nf_elem_set_fmpz_mat_row(z::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZMatrix}, (i - 1)::Int, d::Ref{ZZRingElem}, a::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_set_fmpz_mat_row(z::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZMatrix}, (i - 1)::Int, d::Ref{ZZRingElemRaw}, a::Ref{AbsSimpleNumField})::Nothing
return z
end

function elem_to_mat_row!(a::ZZMatrix, i::Int, d::ZZRingElem, b::AbsSimpleNumFieldElem)
@ccall libflint.nf_elem_get_fmpz_mat_row(a::Ref{ZZMatrix}, (i - 1)::Int, d::Ref{ZZRingElem}, b::Ref{AbsSimpleNumFieldElem}, b.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_get_fmpz_mat_row(a::Ref{ZZMatrix}, (i - 1)::Int, d::Ref{ZZRingElemRaw}, b::Ref{AbsSimpleNumFieldElem}, b.parent::Ref{AbsSimpleNumField})::Nothing
nothing
end

Expand Down Expand Up @@ -285,7 +285,7 @@ end

function +(a::AbsSimpleNumFieldElem, b::ZZRingElem)
r = a.parent()
@ccall libflint.nf_elem_add_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_add_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return r
end

Expand All @@ -303,7 +303,7 @@ end

function -(a::AbsSimpleNumFieldElem, b::ZZRingElem)
r = a.parent()
@ccall libflint.nf_elem_sub_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_sub_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return r
end

Expand All @@ -321,7 +321,7 @@ end

function -(a::ZZRingElem, b::AbsSimpleNumFieldElem)
r = b.parent()
@ccall libflint.nf_elem_fmpz_sub(r::Ref{AbsSimpleNumFieldElem}, a::Ref{ZZRingElem}, b::Ref{AbsSimpleNumFieldElem}, b.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_fmpz_sub(r::Ref{AbsSimpleNumFieldElem}, a::Ref{ZZRingElemRaw}, b::Ref{AbsSimpleNumFieldElem}, b.parent::Ref{AbsSimpleNumField})::Nothing
return r
end

Expand Down Expand Up @@ -357,7 +357,7 @@ end

function *(a::AbsSimpleNumFieldElem, b::ZZRingElem)
r = a.parent()
@ccall libflint.nf_elem_scalar_mul_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_scalar_mul_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return r
end

Expand Down Expand Up @@ -432,7 +432,7 @@ end
###############################################################################

function ==(a::AbsSimpleNumFieldElem, b::ZZRingElem)
b = @ccall libflint.nf_elem_equal_fmpz(a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Cint
b = @ccall libflint.nf_elem_equal_fmpz(a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Cint
return Bool(b)
end

Expand Down Expand Up @@ -516,7 +516,7 @@ end
function divexact(a::AbsSimpleNumFieldElem, b::ZZRingElem; check::Bool=true)
iszero(b) && throw(DivideError())
r = a.parent()
@ccall libflint.nf_elem_scalar_div_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_scalar_div_fmpz(r::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return r
end

Expand Down Expand Up @@ -627,7 +627,7 @@ function representation_matrix_q(a::AbsSimpleNumFieldElem)
K = parent(a)
z = ZZMatrix(degree(K), degree(K))
d = ZZRingElem()
@ccall libflint.nf_elem_rep_mat_fmpz_mat_den(z::Ref{ZZMatrix}, d::Ref{ZZRingElem}, a::Ref{AbsSimpleNumFieldElem}, K::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_rep_mat_fmpz_mat_den(z::Ref{ZZMatrix}, d::Ref{ZZRingElemRaw}, a::Ref{AbsSimpleNumFieldElem}, K::Ref{AbsSimpleNumField})::Nothing
return z, d
end

Expand Down Expand Up @@ -708,7 +708,7 @@ function add!(c::AbsSimpleNumFieldElem, a::AbsSimpleNumFieldElem, b::QQFieldElem
end

function add!(c::AbsSimpleNumFieldElem, a::AbsSimpleNumFieldElem, b::ZZRingElem)
@ccall libflint.nf_elem_add_fmpz(c::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_add_fmpz(c::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return c
end

Expand All @@ -730,7 +730,7 @@ function sub!(c::AbsSimpleNumFieldElem, a::AbsSimpleNumFieldElem, b::QQFieldElem
end

function sub!(c::AbsSimpleNumFieldElem, a::AbsSimpleNumFieldElem, b::ZZRingElem)
@ccall libflint.nf_elem_sub_fmpz(c::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_sub_fmpz(c::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return c
end

Expand All @@ -747,7 +747,7 @@ function sub!(c::AbsSimpleNumFieldElem, a::QQFieldElem, b::AbsSimpleNumFieldElem
end

function sub!(c::AbsSimpleNumFieldElem, a::ZZRingElem, b::AbsSimpleNumFieldElem)
@ccall libflint.nf_elem_fmpz_sub(c::Ref{AbsSimpleNumFieldElem}, a::Ref{ZZRingElem}, b::Ref{AbsSimpleNumFieldElem}, parent(b)::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_fmpz_sub(c::Ref{AbsSimpleNumFieldElem}, a::Ref{ZZRingElemRaw}, b::Ref{AbsSimpleNumFieldElem}, parent(b)::Ref{AbsSimpleNumField})::Nothing
return c
end

Expand All @@ -764,7 +764,7 @@ function mul!(c::AbsSimpleNumFieldElem, a::AbsSimpleNumFieldElem, b::QQFieldElem
end

function mul!(c::AbsSimpleNumFieldElem, a::AbsSimpleNumFieldElem, b::ZZRingElem)
@ccall libflint.nf_elem_scalar_mul_fmpz(c::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, a.parent::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_scalar_mul_fmpz(c::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, a.parent::Ref{AbsSimpleNumField})::Nothing
return c
end

Expand All @@ -781,7 +781,7 @@ function divexact!(z::AbsSimpleNumFieldElem, x::AbsSimpleNumFieldElem, y::Int)
end

function divexact!(z::AbsSimpleNumFieldElem, x::AbsSimpleNumFieldElem, y::ZZRingElem)
@ccall libflint.nf_elem_scalar_div_fmpz(z::Ref{AbsSimpleNumFieldElem}, x::Ref{AbsSimpleNumFieldElem}, y::Ref{ZZRingElem}, parent(x)::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_scalar_div_fmpz(z::Ref{AbsSimpleNumFieldElem}, x::Ref{AbsSimpleNumFieldElem}, y::Ref{ZZRingElemRaw}, parent(x)::Ref{AbsSimpleNumField})::Nothing
return z
end

Expand Down Expand Up @@ -999,7 +999,7 @@ end

function (a::AbsSimpleNumField)(c::ZZRingElem)
z = AbsSimpleNumFieldElem(a)
@ccall libflint.nf_elem_set_fmpz(z::Ref{AbsSimpleNumFieldElem}, c::Ref{ZZRingElem}, a::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_set_fmpz(z::Ref{AbsSimpleNumFieldElem}, c::Ref{ZZRingElemRaw}, a::Ref{AbsSimpleNumField})::Nothing
return z
end

Expand Down Expand Up @@ -1293,7 +1293,7 @@ base_field(::AbsSimpleNumField) = QQ
###############################################################################

function mod_sym!(a::AbsSimpleNumFieldElem, b::ZZRingElem)
@ccall libflint.nf_elem_smod_fmpz(a::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElem}, parent(a)::Ref{AbsSimpleNumField})::Nothing
@ccall libflint.nf_elem_smod_fmpz(a::Ref{AbsSimpleNumFieldElem}, a::Ref{AbsSimpleNumFieldElem}, b::Ref{ZZRingElemRaw}, parent(a)::Ref{AbsSimpleNumField})::Nothing
return a
end

Expand Down
16 changes: 8 additions & 8 deletions src/arb/Complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ for (f,s) in ((:+, "add"), (:-, "sub"), (:*, "mul"), (://, "div"), (:^, "pow"))
function ($f)(x::ComplexFieldElem, y::ZZRingElem, prec::Int = precision(Balls))
z = ComplexFieldElem()
ccall(($("acb_"*s*"_fmpz"), libflint), Nothing,
(Ref{ComplexFieldElem}, Ref{ComplexFieldElem}, Ref{ZZRingElem}, Int),
(Ref{ComplexFieldElem}, Ref{ComplexFieldElem}, Ref{ZZRingElemRaw}, Int),
z, x, y, prec)
return z
end
Expand Down Expand Up @@ -268,7 +268,7 @@ end

function -(x::ZZRingElem, y::ComplexFieldElem)
z = ComplexFieldElem()
@ccall libflint.acb_sub_fmpz(z::Ref{ComplexFieldElem}, y::Ref{ComplexFieldElem}, x::Ref{ZZRingElem}, precision(Balls)::Int)::Nothing
@ccall libflint.acb_sub_fmpz(z::Ref{ComplexFieldElem}, y::Ref{ComplexFieldElem}, x::Ref{ZZRingElemRaw}, precision(Balls)::Int)::Nothing
return neg!(z)
end

Expand Down Expand Up @@ -435,13 +435,13 @@ Returns `true` if the box $x$ contains the given integer value, otherwise
return `false`.
"""
function contains(x::ComplexFieldElem, y::ZZRingElem)
r = @ccall libflint.acb_contains_fmpz(x::Ref{ComplexFieldElem}, y::Ref{ZZRingElem})::Cint
r = @ccall libflint.acb_contains_fmpz(x::Ref{ComplexFieldElem}, y::Ref{ZZRingElemRaw})::Cint
return Bool(r)
end

function contains(x::ComplexFieldElem, y::Int)
v = ZZRingElem(y)
r = @ccall libflint.acb_contains_fmpz(x::Ref{ComplexFieldElem}, v::Ref{ZZRingElem})::Cint
r = @ccall libflint.acb_contains_fmpz(x::Ref{ComplexFieldElem}, v::Ref{ZZRingElemRaw})::Cint
return Bool(r)
end

Expand Down Expand Up @@ -567,7 +567,7 @@ end

function ldexp(x::ComplexFieldElem, y::ZZRingElem)
z = ComplexFieldElem()
@ccall libflint.acb_mul_2exp_fmpz(z::Ref{ComplexFieldElem}, x::Ref{ComplexFieldElem}, y::Ref{ZZRingElem})::Nothing
@ccall libflint.acb_mul_2exp_fmpz(z::Ref{ComplexFieldElem}, x::Ref{ComplexFieldElem}, y::Ref{ZZRingElemRaw})::Nothing
return z
end

Expand Down Expand Up @@ -599,7 +599,7 @@ integer.
"""
function unique_integer(x::ComplexFieldElem)
z = ZZRingElem()
unique = @ccall libflint.acb_get_unique_fmpz(z::Ref{ZZRingElem}, x::Ref{ComplexFieldElem})::Int
unique = @ccall libflint.acb_get_unique_fmpz(z::Ref{ZZRingElemRaw}, x::Ref{ComplexFieldElem})::Int
return (unique != 0, z)
end

Expand Down Expand Up @@ -1619,11 +1619,11 @@ function _acb_set(x::ComplexFieldElemOrPtr, y::Union{Int,UInt,Float64}, p::Int)
end

function _acb_set(x::ComplexFieldElemOrPtr, y::ZZRingElem)
@ccall libflint.acb_set_fmpz(x::Ref{ComplexFieldElem}, y::Ref{ZZRingElem})::Nothing
@ccall libflint.acb_set_fmpz(x::Ref{ComplexFieldElem}, y::Ref{ZZRingElemRaw})::Nothing
end

function _acb_set(x::ComplexFieldElemOrPtr, y::ZZRingElem, p::Int)
@ccall libflint.acb_set_round_fmpz(x::Ref{ComplexFieldElem}, y::Ref{ZZRingElem}, p::Int)::Nothing
@ccall libflint.acb_set_round_fmpz(x::Ref{ComplexFieldElem}, y::Ref{ZZRingElemRaw}, p::Int)::Nothing
end

function _acb_set(x::ComplexFieldElemOrPtr, y::QQFieldElem, p::Int)
Expand Down
4 changes: 2 additions & 2 deletions src/arb/ComplexMat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ end

function *(x::ComplexMatrix, y::ZZRingElem)
z = similar(x)
@ccall libflint.acb_mat_scalar_mul_fmpz(z::Ref{ComplexMatrix}, x::Ref{ComplexMatrix}, y::Ref{ZZRingElem}, precision(Balls)::Int)::Nothing
@ccall libflint.acb_mat_scalar_mul_fmpz(z::Ref{ComplexMatrix}, x::Ref{ComplexMatrix}, y::Ref{ZZRingElemRaw}, precision(Balls)::Int)::Nothing
return z
end

Expand Down Expand Up @@ -410,7 +410,7 @@ end

function divexact(x::ComplexMatrix, y::ZZRingElem; check::Bool=true)
z = similar(x)
@ccall libflint.acb_mat_scalar_div_fmpz(z::Ref{ComplexMatrix}, x::Ref{ComplexMatrix}, y::Ref{ZZRingElem}, precision(Balls)::Int)::Nothing
@ccall libflint.acb_mat_scalar_div_fmpz(z::Ref{ComplexMatrix}, x::Ref{ComplexMatrix}, y::Ref{ZZRingElemRaw}, precision(Balls)::Int)::Nothing
return z
end

Expand Down
Loading
Loading