diff --git a/docs/src/integer.md b/docs/src/integer.md index 6b8868527..2445b960d 100644 --- a/docs/src/integer.md +++ b/docs/src/integer.md @@ -428,7 +428,7 @@ base(::ZZRingElem, ::Integer) ``` ```@docs -ndigits(::ZZRingElem, ::Integer) +number_of_digits(::ZZRingElem, ::Integer) ``` ```@docs diff --git a/src/Exports.jl b/src/Exports.jl index e5b0a7bb6..b43b3013b 100644 --- a/src/Exports.jl +++ b/src/Exports.jl @@ -451,7 +451,6 @@ export NALocalFieldElem export Native export nbits export ncdivrem -export ndigits export ndivrem export neg! export NegInf diff --git a/src/Nemo.jl b/src/Nemo.jl index c6d828288..a3705e4e2 100644 --- a/src/Nemo.jl +++ b/src/Nemo.jl @@ -101,7 +101,6 @@ import Base: log1p import Base: maximum import Base: minimum import Base: mod -import Base: ndigits import Base: numerator import Base: oct import Base: one diff --git a/src/arb/ComplexMat.jl b/src/arb/ComplexMat.jl index 97459d63f..624a6eac6 100644 --- a/src/arb/ComplexMat.jl +++ b/src/arb/ComplexMat.jl @@ -105,13 +105,13 @@ function one(x::ComplexMatSpace) return z end -nrows(a::ComplexMat) = a.r +number_of_rows(a::ComplexMat) = a.r -ncols(a::ComplexMat) = a.c +number_of_columns(a::ComplexMat) = a.c -nrows(a::ComplexMatSpace) = a.nrows +number_of_rows(a::ComplexMatSpace) = a.nrows -ncols(a::ComplexMatSpace) = a.ncols +number_of_columns(a::ComplexMatSpace) = a.ncols function deepcopy_internal(x::ComplexMat, dict::IdDict) z = similar(x) diff --git a/src/arb/RealMat.jl b/src/arb/RealMat.jl index bbd0658f6..e4f15263c 100644 --- a/src/arb/RealMat.jl +++ b/src/arb/RealMat.jl @@ -92,13 +92,13 @@ function one(x::RealMatSpace) return z end -nrows(a::RealMat) = a.r +number_of_rows(a::RealMat) = a.r -ncols(a::RealMat) = a.c +number_of_columns(a::RealMat) = a.c -nrows(a::RealMatSpace) = a.nrows +number_of_rows(a::RealMatSpace) = a.nrows -ncols(a::RealMatSpace) = a.ncols +number_of_columns(a::RealMatSpace) = a.ncols function deepcopy_internal(x::RealMat, dict::IdDict) z = RealMat(nrows(x), ncols(x)) diff --git a/src/arb/acb_mat.jl b/src/arb/acb_mat.jl index 7a57f7410..bf68d06f2 100644 --- a/src/arb/acb_mat.jl +++ b/src/arb/acb_mat.jl @@ -108,13 +108,13 @@ function one(x::AcbMatSpace) return z end -nrows(a::acb_mat) = a.r +number_of_rows(a::acb_mat) = a.r -ncols(a::acb_mat) = a.c +number_of_columns(a::acb_mat) = a.c -nrows(a::AcbMatSpace) = a.nrows +number_of_rows(a::AcbMatSpace) = a.nrows -ncols(a::AcbMatSpace) = a.ncols +number_of_columns(a::AcbMatSpace) = a.ncols function deepcopy_internal(x::acb_mat, dict::IdDict) z = similar(x) diff --git a/src/arb/arb_mat.jl b/src/arb/arb_mat.jl index 1a3229ccd..0e428be56 100644 --- a/src/arb/arb_mat.jl +++ b/src/arb/arb_mat.jl @@ -95,13 +95,13 @@ function one(x::ArbMatSpace) return z end -nrows(a::arb_mat) = a.r +number_of_rows(a::arb_mat) = a.r -ncols(a::arb_mat) = a.c +number_of_columns(a::arb_mat) = a.c -nrows(a::ArbMatSpace) = a.nrows +number_of_rows(a::ArbMatSpace) = a.nrows -ncols(a::ArbMatSpace) = a.ncols +number_of_columns(a::ArbMatSpace) = a.ncols function deepcopy_internal(x::arb_mat, dict::IdDict) z = arb_mat(nrows(x), ncols(x)) diff --git a/src/flint/fmpq_mat.jl b/src/flint/fmpq_mat.jl index fd34a86d2..51afb4507 100644 --- a/src/flint/fmpq_mat.jl +++ b/src/flint/fmpq_mat.jl @@ -154,13 +154,13 @@ Base.@propagate_inbounds setindex!(a::QQMatrix, d::Rational, r::Int, c::Int) = setindex!(a, QQFieldElem(d), r, c) -nrows(a::QQMatrix) = a.r +number_of_rows(a::QQMatrix) = a.r -ncols(a::QQMatrix) = a.c +number_of_columns(a::QQMatrix) = a.c -nrows(a::QQMatrixSpace) = a.nrows +number_of_rows(a::QQMatrixSpace) = a.nrows -ncols(a::QQMatrixSpace) = a.ncols +number_of_columns(a::QQMatrixSpace) = a.ncols zero(a::QQMatrixSpace) = a() diff --git a/src/flint/fmpq_mpoly.jl b/src/flint/fmpq_mpoly.jl index e9aca5f76..57954aa49 100644 --- a/src/flint/fmpq_mpoly.jl +++ b/src/flint/fmpq_mpoly.jl @@ -25,7 +25,7 @@ function check_parent(a::QQMPolyRingElem, b::QQMPolyRingElem) error("Incompatible polynomial rings in polynomial operation") end -nvars(a::QQMPolyRing) = ccall((:fmpq_mpoly_ctx_nvars, libflint), Int, +number_of_variables(a::QQMPolyRing) = ccall((:fmpq_mpoly_ctx_nvars, libflint), Int, (Ref{QQMPolyRing}, ), a) base_ring(a::QQMPolyRing) = FlintQQ diff --git a/src/flint/fmpz.jl b/src/flint/fmpz.jl index 60767f9cc..888c14e64 100644 --- a/src/flint/fmpz.jl +++ b/src/flint/fmpz.jl @@ -2234,22 +2234,22 @@ function base(n::ZZRingElem, b::Integer) end @doc raw""" - ndigits(x::ZZRingElem, b::Integer) + number_of_digits(x::ZZRingElem, b::Integer) Return the number of digits of $x$ in the base $b$ (default is $b = 10$). # Examples ```jldoctest -julia> ndigits(ZZ(12), 3) +julia> number_of_digits(ZZ(12), 3) 3 ``` """ -function Base.ndigits(x::ZZRingElem, b::Integer)::Int - ndigits(x, base=b) +function number_of_digits(x::ZZRingElem, b::Integer)::Int + number_of_digits(x, base=b) end -function Base.ndigits(a::ZZRingElem; base::Integer = 10, pad::Integer = 1) +function number_of_digits(a::ZZRingElem; base::Integer = 10, pad::Integer = 1) iszero(a) && return max(pad, 1) return max(pad, 1+flog(abs(a), ZZRingElem(abs(base)))) end diff --git a/src/flint/fmpz_mat.jl b/src/flint/fmpz_mat.jl index 8c4481af7..b00288ae4 100644 --- a/src/flint/fmpz_mat.jl +++ b/src/flint/fmpz_mat.jl @@ -156,13 +156,13 @@ end end end -@inline nrows(a::ZZMatrix) = a.r +@inline number_of_rows(a::ZZMatrix) = a.r -@inline ncols(a::ZZMatrix) = a.c +@inline number_of_columns(a::ZZMatrix) = a.c -nrows(a::ZZMatrixSpace) = a.nrows +number_of_rows(a::ZZMatrixSpace) = a.nrows -ncols(a::ZZMatrixSpace) = a.ncols +number_of_columns(a::ZZMatrixSpace) = a.ncols zero(a::ZZMatrixSpace) = a() diff --git a/src/flint/fmpz_mod_mat.jl b/src/flint/fmpz_mod_mat.jl index 653873866..7ee8a9f97 100644 --- a/src/flint/fmpz_mod_mat.jl +++ b/src/flint/fmpz_mod_mat.jl @@ -91,13 +91,13 @@ function deepcopy_internal(a::ZZModMatrix, dict::IdDict) return z end -nrows(a::T) where T <: Zmod_fmpz_mat = a.r +number_of_rows(a::T) where T <: Zmod_fmpz_mat = a.r -ncols(a::T) where T <: Zmod_fmpz_mat = a.c +number_of_columns(a::T) where T <: Zmod_fmpz_mat = a.c -nrows(a::ZZModMatrixSpace) = a.nrows +number_of_rows(a::ZZModMatrixSpace) = a.nrows -ncols(a::ZZModMatrixSpace) = a.ncols +number_of_columns(a::ZZModMatrixSpace) = a.ncols parent(a::Zmod_fmpz_mat) = matrix_space(base_ring(a), nrows(a), ncols(a)) diff --git a/src/flint/fmpz_mod_mpoly.jl b/src/flint/fmpz_mod_mpoly.jl index e92e315ad..f990ff595 100644 --- a/src/flint/fmpz_mod_mpoly.jl +++ b/src/flint/fmpz_mod_mpoly.jl @@ -30,7 +30,7 @@ function check_parent(a::($etype), b::($etype)) error("Incompatible polynomial rings in polynomial operation") end -nvars(a::($rtype)) = a.nvars +number_of_variables(a::($rtype)) = a.nvars base_ring(a::($rtype)) = a.base_ring diff --git a/src/flint/fmpz_mpoly.jl b/src/flint/fmpz_mpoly.jl index af8c7bf4b..e3c8ab660 100644 --- a/src/flint/fmpz_mpoly.jl +++ b/src/flint/fmpz_mpoly.jl @@ -25,7 +25,7 @@ function check_parent(a::ZZMPolyRingElem, b::ZZMPolyRingElem) error("Incompatible polynomial rings in polynomial operation") end -nvars(a::ZZMPolyRing) = ccall((:fmpz_mpoly_ctx_nvars, libflint), Int, +number_of_variables(a::ZZMPolyRing) = ccall((:fmpz_mpoly_ctx_nvars, libflint), Int, (Ref{ZZMPolyRing}, ), a) base_ring(a::ZZMPolyRing) = FlintZZ diff --git a/src/flint/fq_default_mat.jl b/src/flint/fq_default_mat.jl index bd206f439..a94a35190 100644 --- a/src/flint/fq_default_mat.jl +++ b/src/flint/fq_default_mat.jl @@ -77,21 +77,21 @@ function deepcopy_internal(a::FqMatrix, dict::IdDict) return z end -function nrows(a::FqMatrix) +function number_of_rows(a::FqMatrix) return ccall((:fq_default_mat_nrows, libflint), Int, (Ref{FqMatrix}, Ref{FqField}), a, base_ring(a)) end -function ncols(a::FqMatrix) +function number_of_columns(a::FqMatrix) return ccall((:fq_default_mat_ncols, libflint), Int, (Ref{FqMatrix}, Ref{FqField}), a, base_ring(a)) end -nrows(a::FqMatrixSpace) = a.nrows +number_of_rows(a::FqMatrixSpace) = a.nrows -ncols(a::FqMatrixSpace) = a.ncols +number_of_columns(a::FqMatrixSpace) = a.ncols parent(a::FqMatrix) = matrix_space(base_ring(a), nrows(a), ncols(a)) diff --git a/src/flint/fq_default_mpoly.jl b/src/flint/fq_default_mpoly.jl index d62680c6b..fffffb616 100644 --- a/src/flint/fq_default_mpoly.jl +++ b/src/flint/fq_default_mpoly.jl @@ -14,7 +14,7 @@ symbols(a::FqMPolyRing) = symbols(a.data) parent(a::FqMPolyRingElem) = a.parent -nvars(a::FqMPolyRing) = nvars(a.data) +number_of_variables(a::FqMPolyRing) = number_of_variables(a.data) base_ring(a::FqMPolyRing) = a.base_ring diff --git a/src/flint/fq_mat.jl b/src/flint/fq_mat.jl index 6cb2336b5..da1e8c759 100644 --- a/src/flint/fq_mat.jl +++ b/src/flint/fq_mat.jl @@ -78,13 +78,13 @@ function deepcopy_internal(a::FqPolyRepMatrix, dict::IdDict) return z end -nrows(a::FqPolyRepMatrix) = a.r +number_of_rows(a::FqPolyRepMatrix) = a.r -ncols(a::FqPolyRepMatrix) = a.c +number_of_columns(a::FqPolyRepMatrix) = a.c -nrows(a::FqPolyRepMatrixSpace) = a.nrows +number_of_rows(a::FqPolyRepMatrixSpace) = a.nrows -ncols(a::FqPolyRepMatrixSpace) = a.ncols +number_of_columns(a::FqPolyRepMatrixSpace) = a.ncols parent(a::FqPolyRepMatrix) = matrix_space(base_ring(a), nrows(a), ncols(a)) diff --git a/src/flint/fq_nmod_mat.jl b/src/flint/fq_nmod_mat.jl index 69ba1b7ff..875f6759f 100644 --- a/src/flint/fq_nmod_mat.jl +++ b/src/flint/fq_nmod_mat.jl @@ -78,13 +78,13 @@ function deepcopy_internal(a::fqPolyRepMatrix, dict::IdDict) return z end -nrows(a::fqPolyRepMatrix) = a.r +number_of_rows(a::fqPolyRepMatrix) = a.r -ncols(a::fqPolyRepMatrix) = a.c +number_of_columns(a::fqPolyRepMatrix) = a.c -nrows(a::fqPolyRepMatrixSpace) = a.nrows +number_of_rows(a::fqPolyRepMatrixSpace) = a.nrows -ncols(a::fqPolyRepMatrixSpace) = a.ncols +number_of_columns(a::fqPolyRepMatrixSpace) = a.ncols parent(a::fqPolyRepMatrix) = matrix_space(base_ring(a), nrows(a), ncols(a)) diff --git a/src/flint/fq_nmod_mpoly.jl b/src/flint/fq_nmod_mpoly.jl index a1010d500..7cb3f50c9 100644 --- a/src/flint/fq_nmod_mpoly.jl +++ b/src/flint/fq_nmod_mpoly.jl @@ -25,7 +25,7 @@ function check_parent(a::fqPolyRepMPolyRingElem, b::fqPolyRepMPolyRingElem) error("Incompatible polynomial rings in polynomial operation") end -nvars(a::fqPolyRepMPolyRing) = a.nvars +number_of_variables(a::fqPolyRepMPolyRing) = a.nvars base_ring(a::fqPolyRepMPolyRing) = a.base_ring diff --git a/src/flint/gfp_fmpz_mat.jl b/src/flint/gfp_fmpz_mat.jl index b0aa12d2c..1f0a48bef 100644 --- a/src/flint/gfp_fmpz_mat.jl +++ b/src/flint/gfp_fmpz_mat.jl @@ -79,13 +79,13 @@ function deepcopy_internal(a::FpMatrix, dict::IdDict) return z end -nrows(a::FpMatrix) = a.r +number_of_rows(a::FpMatrix) = a.r -ncols(a::FpMatrix) = a.c +number_of_columns(a::FpMatrix) = a.c -nrows(a::FpMatrixSpace) = a.nrows +number_of_rows(a::FpMatrixSpace) = a.nrows -ncols(a::FpMatrixSpace) = a.ncols +number_of_columns(a::FpMatrixSpace) = a.ncols parent(a::FpMatrix) = matrix_space(base_ring(a), nrows(a), ncols(a)) diff --git a/src/flint/gfp_mat.jl b/src/flint/gfp_mat.jl index b51335c35..f739483ec 100644 --- a/src/flint/gfp_mat.jl +++ b/src/flint/gfp_mat.jl @@ -59,9 +59,9 @@ function deepcopy_internal(a::fpMatrix, dict::IdDict) return z end -nrows(a::fpMatrixSpace) = a.nrows +number_of_rows(a::fpMatrixSpace) = a.nrows -ncols(a::fpMatrixSpace) = a.ncols +number_of_columns(a::fpMatrixSpace) = a.ncols base_ring(a::fpMatrixSpace) = a.base_ring diff --git a/src/flint/nmod_mat.jl b/src/flint/nmod_mat.jl index c57b065da..569fda855 100644 --- a/src/flint/nmod_mat.jl +++ b/src/flint/nmod_mat.jl @@ -103,13 +103,13 @@ function deepcopy_internal(a::zzModMatrix, dict::IdDict) return z end -nrows(a::T) where T <: Zmodn_mat = a.r +number_of_rows(a::T) where T <: Zmodn_mat = a.r -ncols(a::T) where T <: Zmodn_mat = a.c +number_of_columns(a::T) where T <: Zmodn_mat = a.c -nrows(a::zzModMatrixSpace) = a.nrows +number_of_rows(a::zzModMatrixSpace) = a.nrows -ncols(a::zzModMatrixSpace) = a.ncols +number_of_columns(a::zzModMatrixSpace) = a.ncols parent(a::Zmodn_mat) = matrix_space(base_ring(a), nrows(a), ncols(a)) diff --git a/src/flint/nmod_mpoly.jl b/src/flint/nmod_mpoly.jl index 419b4e759..c8034f752 100644 --- a/src/flint/nmod_mpoly.jl +++ b/src/flint/nmod_mpoly.jl @@ -30,7 +30,7 @@ function check_parent(a::($etype), b::($etype)) error("Incompatible polynomial rings in polynomial operation") end -nvars(a::($rtype)) = a.nvars +number_of_variables(a::($rtype)) = a.nvars base_ring(a::($rtype)) = a.base_ring