Skip to content

Commit

Permalink
Change 'nonnegative' to 'non-negative' for consistency (#1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Sep 19, 2023
1 parent 9de7949 commit 46c1cb7
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/src/integer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/arb/ComplexMat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/arb/Real.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/arb/RealMat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/arb/acb_mat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/arb/arb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/arb/arb_mat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/flint/fmpq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down
8 changes: 4 additions & 4 deletions src/flint/fmpz.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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})
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/flint/fmpz_mod_poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/flint/gfp_fmpz_poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/flint/gfp_poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/flint/nmod_poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -395,15 +395,15 @@ 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)
return z
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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/flint/padic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/flint/qadic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 46c1cb7

Please sign in to comment.