From 46c1cb73561e5eede3dcd77b8a6c4ec394626e11 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Sep 2023 08:27:33 +0200 Subject: [PATCH] Change 'nonnegative' to 'non-negative' for consistency (#1539) --- docs/src/integer.md | 2 +- src/arb/ComplexMat.jl | 2 +- src/arb/Real.jl | 6 +++--- src/arb/RealMat.jl | 2 +- src/arb/acb_mat.jl | 2 +- src/arb/arb.jl | 6 +++--- src/arb/arb_mat.jl | 2 +- src/flint/fmpq.jl | 6 +++--- src/flint/fmpz.jl | 8 ++++---- src/flint/fmpz_mod_poly.jl | 2 +- src/flint/gfp_fmpz_poly.jl | 2 +- src/flint/gfp_poly.jl | 2 +- src/flint/nmod_poly.jl | 8 ++++---- src/flint/padic.jl | 2 +- src/flint/qadic.jl | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/src/integer.md b/docs/src/integer.md index cd39d7c28..6b8868527 100644 --- a/docs/src/integer.md +++ b/docs/src/integer.md @@ -213,7 +213,7 @@ We then implement all the other operators, including `==` in terms of `cmp`. For convenience we also implement a `cmpabs(a, b)` function which returns a positive value if $|a| > |b|$, zero if $|a| == |b|$ and a negative value if $|a| < |b|$. This can be slightly faster than a call to `cmp` or one of the -comparison operators when comparing nonnegative values for example. +comparison operators when comparing non-negative values for example. Here is a list of the comparison functions implemented, with the understanding that `cmp` provides all of the comparison operators listed above. diff --git a/src/arb/ComplexMat.jl b/src/arb/ComplexMat.jl index f0b9864ef..495930684 100644 --- a/src/arb/ComplexMat.jl +++ b/src/arb/ComplexMat.jl @@ -631,7 +631,7 @@ end @doc raw""" bound_inf_norm(x::ComplexMat) -Returns a nonnegative element $z$ of type `acb`, such that $z$ is an upper +Returns a non-negative element $z$ of type `acb`, such that $z$ is an upper bound for the infinity norm for every matrix in $x$ """ function bound_inf_norm(x::ComplexMat) diff --git a/src/arb/Real.jl b/src/arb/Real.jl index fd9a2f05c..a08c77e3a 100644 --- a/src/arb/Real.jl +++ b/src/arb/Real.jl @@ -327,7 +327,7 @@ end @doc raw""" contains_nonnegative(x::RealFieldElem) -Returns `true` if the ball $x$ contains any nonnegative value, otherwise +Returns `true` if the ball $x$ contains any non-negative value, otherwise return `false`. """ function contains_nonnegative(x::RealFieldElem) @@ -529,7 +529,7 @@ end @doc raw""" is_nonnegative(x::RealFieldElem) -Return `true` if $x$ is certainly nonnegative, otherwise return `false`. +Return `true` if $x$ is certainly non-negative, otherwise return `false`. """ function is_nonnegative(x::RealFieldElem) return Bool(ccall((:arb_is_nonnegative, libarb), Cint, (Ref{RealFieldElem},), x)) @@ -1146,7 +1146,7 @@ end @doc raw""" sqrtpos(x::RealFieldElem) -Return the sqrt root of $x$, assuming that $x$ represents a nonnegative +Return the sqrt root of $x$, assuming that $x$ represents a non-negative number. Thus any negative number in the input interval is discarded. """ function sqrtpos(x::RealFieldElem, prec::Int = precision(Balls)) diff --git a/src/arb/RealMat.jl b/src/arb/RealMat.jl index 0be07cddf..f6fbdd6ae 100644 --- a/src/arb/RealMat.jl +++ b/src/arb/RealMat.jl @@ -573,7 +573,7 @@ end @doc raw""" bound_inf_norm(x::RealMat) -Returns a nonnegative element $z$ of type `arb`, such that $z$ is an upper +Returns a non-negative element $z$ of type `arb`, such that $z$ is an upper bound for the infinity norm for every matrix in $x$ """ function bound_inf_norm(x::RealMat) diff --git a/src/arb/acb_mat.jl b/src/arb/acb_mat.jl index 0e65402bf..f60ffdf8d 100644 --- a/src/arb/acb_mat.jl +++ b/src/arb/acb_mat.jl @@ -634,7 +634,7 @@ end @doc raw""" bound_inf_norm(x::acb_mat) -Returns a nonnegative element $z$ of type `acb`, such that $z$ is an upper +Returns a non-negative element $z$ of type `acb`, such that $z$ is an upper bound for the infinity norm for every matrix in $x$ """ function bound_inf_norm(x::acb_mat) diff --git a/src/arb/arb.jl b/src/arb/arb.jl index 464264282..56143b9d4 100644 --- a/src/arb/arb.jl +++ b/src/arb/arb.jl @@ -347,7 +347,7 @@ end @doc raw""" contains_nonnegative(x::arb) -Returns `true` if the ball $x$ contains any nonnegative value, otherwise +Returns `true` if the ball $x$ contains any non-negative value, otherwise return `false`. """ function contains_nonnegative(x::arb) @@ -549,7 +549,7 @@ end @doc raw""" is_nonnegative(x::arb) -Return `true` if $x$ is certainly nonnegative, otherwise return `false`. +Return `true` if $x$ is certainly non-negative, otherwise return `false`. """ function is_nonnegative(x::arb) return Bool(ccall((:arb_is_nonnegative, libarb), Cint, (Ref{arb},), x)) @@ -1185,7 +1185,7 @@ end @doc raw""" sqrtpos(x::arb) -Return the sqrt root of $x$, assuming that $x$ represents a nonnegative +Return the sqrt root of $x$, assuming that $x$ represents a non-negative number. Thus any negative number in the input interval is discarded. """ function sqrtpos(x::arb) diff --git a/src/arb/arb_mat.jl b/src/arb/arb_mat.jl index f9efbd083..167d0e379 100644 --- a/src/arb/arb_mat.jl +++ b/src/arb/arb_mat.jl @@ -577,7 +577,7 @@ end @doc raw""" bound_inf_norm(x::arb_mat) -Returns a nonnegative element $z$ of type `arb`, such that $z$ is an upper +Returns a non-negative element $z$ of type `arb`, such that $z$ is an upper bound for the infinity norm for every matrix in $x$ """ function bound_inf_norm(x::arb_mat) diff --git a/src/flint/fmpq.jl b/src/flint/fmpq.jl index 140d780d1..c79abc283 100644 --- a/src/flint/fmpq.jl +++ b/src/flint/fmpq.jl @@ -725,7 +725,7 @@ Given $a$, return the next rational number in the sequence obtained by enumerating all positive denominators $q$, and for each $q$ enumerating the numerators $1 \le p < q$ in order and generating both $p/q$ and $q/p$, but skipping all gcd$(p,q) \neq 1$. Starting with zero, this generates -every nonnegative rational number once and only once, with the first +every non-negative rational number once and only once, with the first few entries being $0, 1, 1/2, 2, 1/3, 3, 2/3, 3/2, 1/4, 4, 3/4, 4/3, \ldots$. This enumeration produces the rational numbers in order of minimal height. It has the disadvantage of being somewhat slower to compute than the @@ -773,7 +773,7 @@ end next_calkin_wilf(a::QQFieldElem) Return the next number after $a$ in the breadth-first traversal of the -Calkin-Wilf tree. Starting with zero, this generates every nonnegative +Calkin-Wilf tree. Starting with zero, this generates every non-negative rational number once and only once, with the first few entries being $0, 1, 1/2, 2, 1/3, 3/2, 2/3, 3, 1/4, 4/3, 3/5, 5/2, 2/5, \ldots$. Despite the appearance of the initial entries, the Calkin-Wilf enumeration @@ -849,7 +849,7 @@ end @doc raw""" bernoulli(n::Int) -Return the Bernoulli number $B_n$ for nonnegative $n$. +Return the Bernoulli number $B_n$ for non-negative $n$. See also [`bernoulli_cache`](@ref). diff --git a/src/flint/fmpz.jl b/src/flint/fmpz.jl index ae7f3ce0b..8a55a5e01 100644 --- a/src/flint/fmpz.jl +++ b/src/flint/fmpz.jl @@ -1165,7 +1165,7 @@ end gcd(x::ZZRingElem, y::ZZRingElem, z::ZZRingElem...) Return the greatest common divisor of $(x, y, ...)$. The returned result will -always be nonnegative and will be zero iff all inputs are zero. +always be non-negative and will be zero iff all inputs are zero. """ function gcd(x::ZZRingElem, y::ZZRingElem, z::ZZRingElem...) d = ZZRingElem() @@ -1184,7 +1184,7 @@ end gcd(x::Vector{ZZRingElem}) Return the greatest common divisor of the elements of $x$. The returned -result will always be nonnegative and will be zero iff all elements of $x$ +result will always be non-negative and will be zero iff all elements of $x$ are zero. """ function gcd(x::Vector{ZZRingElem}) @@ -1213,7 +1213,7 @@ end lcm(x::ZZRingElem, y::ZZRingElem, z::ZZRingElem...) Return the least common multiple of $(x, y, ...)$. The returned result will -always be nonnegative and will be zero if any input is zero. +always be non-negative and will be zero if any input is zero. """ function lcm(x::ZZRingElem, y::ZZRingElem, z::ZZRingElem...) m = ZZRingElem() @@ -1232,7 +1232,7 @@ end lcm(x::Vector{ZZRingElem}) Return the least common multiple of the elements of $x$. The returned result -will always be nonnegative and will be zero iff the elements of $x$ are zero. +will always be non-negative and will be zero iff the elements of $x$ are zero. """ function lcm(x::Vector{ZZRingElem}) if length(x) == 0 diff --git a/src/flint/fmpz_mod_poly.jl b/src/flint/fmpz_mod_poly.jl index 848c4e1be..a1b164fc2 100644 --- a/src/flint/fmpz_mod_poly.jl +++ b/src/flint/fmpz_mod_poly.jl @@ -722,7 +722,7 @@ end lift(R::ZZPolyRing, y::ZZModPolyRingElem) Lift from a polynomial over $\mathbb{Z}/n\mathbb{Z}$ to a polynomial over -$\mathbb{Z}$ with minimal reduced nonnegative coefficients. The ring `R` +$\mathbb{Z}$ with minimal reduced non-negative coefficients. The ring `R` specifies the ring to lift into. """ function lift(R::ZZPolyRing, y::ZZModPolyRingElem) diff --git a/src/flint/gfp_fmpz_poly.jl b/src/flint/gfp_fmpz_poly.jl index 896b28a4e..ef18c6925 100644 --- a/src/flint/gfp_fmpz_poly.jl +++ b/src/flint/gfp_fmpz_poly.jl @@ -233,7 +233,7 @@ end lift(R::ZZPolyRing, y::FpPolyRingElem) Lift from a polynomial over $\mathbb{Z}/n\mathbb{Z}$ to a polynomial over -$\mathbb{Z}$ with minimal reduced nonnegative coefficients. The ring `R` +$\mathbb{Z}$ with minimal reduced non-negative coefficients. The ring `R` specifies the ring to lift into. """ function lift(R::ZZPolyRing, y::FpPolyRingElem) diff --git a/src/flint/gfp_poly.jl b/src/flint/gfp_poly.jl index df83cb3fd..802315a0a 100644 --- a/src/flint/gfp_poly.jl +++ b/src/flint/gfp_poly.jl @@ -314,7 +314,7 @@ end lift(R::ZZPolyRing, y::fpPolyRingElem) Lift from a polynomial over $\mathbb{Z}/n\mathbb{Z}$ to a polynomial over -$\mathbb{Z}$ with minimal reduced nonnegative coefficients. The ring `R` +$\mathbb{Z}$ with minimal reduced non-negative coefficients. The ring `R` specifies the ring to lift into. """ function lift(R::ZZPolyRing, y::fpPolyRingElem) diff --git a/src/flint/nmod_poly.jl b/src/flint/nmod_poly.jl index e6c363eec..5f308d33a 100644 --- a/src/flint/nmod_poly.jl +++ b/src/flint/nmod_poly.jl @@ -306,7 +306,7 @@ end ################################################################################ function ^(x::T, y::Int) where T <: Zmodn_poly - y < 0 && throw(DomainError(y, "Exponent must be nonnegative")) + y < 0 && throw(DomainError(y, "Exponent must be non-negative")) z = parent(x)() ccall((:nmod_poly_pow, libflint), Nothing, (Ref{T}, Ref{T}, Int), z, x, y) @@ -395,7 +395,7 @@ end ############################################################################### function shift_left(x::T, len::Int) where T <: Zmodn_poly - len < 0 && throw(DomainError(len, "Shift must be nonnegative.")) + len < 0 && throw(DomainError(len, "Shift must be non-negative.")) z = parent(x)() ccall((:nmod_poly_shift_left, libflint), Nothing, (Ref{T}, Ref{T}, Int), z, x, len) @@ -403,7 +403,7 @@ function shift_left(x::T, len::Int) where T <: Zmodn_poly end function shift_right(x::T, len::Int) where T <: Zmodn_poly - len < 0 && throw(DomainError(len, "Shift must be nonnegative.")) + len < 0 && throw(DomainError(len, "Shift must be non-negative.")) z = parent(x)() ccall((:nmod_poly_shift_right, libflint), Nothing, (Ref{T}, Ref{T}, Int), z, x, len) @@ -684,7 +684,7 @@ end lift(R::ZZPolyRing, y::zzModPolyRingElem) Lift from a polynomial over $\mathbb{Z}/n\mathbb{Z}$ to a polynomial over -$\mathbb{Z}$ with minimal reduced nonnegative coefficients. The ring `R` +$\mathbb{Z}$ with minimal reduced non-negative coefficients. The ring `R` specifies the ring to lift into. """ function lift(R::ZZPolyRing, y::zzModPolyRingElem) diff --git a/src/flint/padic.jl b/src/flint/padic.jl index e8f35cb69..e27f01151 100644 --- a/src/flint/padic.jl +++ b/src/flint/padic.jl @@ -614,7 +614,7 @@ end teichmuller(a::padic) Return the Teichmuller lift of the $p$-adic value $a$. We require the -valuation of $a$ to be nonnegative. The precision of the output will be the +valuation of $a$ to be non-negative. The precision of the output will be the same as the precision of the input. For convenience, if $a$ is congruent to zero modulo $p$ we return zero. If the input is not valid an exception is thrown. diff --git a/src/flint/qadic.jl b/src/flint/qadic.jl index cfb0f102e..7f84e5c17 100644 --- a/src/flint/qadic.jl +++ b/src/flint/qadic.jl @@ -570,7 +570,7 @@ end teichmuller(a::qadic) Return the Teichmuller lift of the $q$-adic value $a$. We require the -valuation of $a$ to be nonnegative. The precision of the output will be the +valuation of $a$ to be non-negative. The precision of the output will be the same as the precision of the input. For convenience, if $a$ is congruent to zero modulo $q$ we return zero. If the input is not valid an exception is thrown.