diff --git a/base/div.jl b/base/div.jl index 8821682b28dbb..80d3b6f4ed7df 100644 --- a/base/div.jl +++ b/base/div.jl @@ -14,6 +14,9 @@ without any intermediate rounding. See also [`fld`](@ref) and [`cld`](@ref), which are special cases of this function. +!!! compat "Julia 1.8" + `RoundFromZero` requires at least Julia 1.8. + # Examples: ```jldoctest julia> div(4, 3, RoundDown) # Matches fld(4, 3) @@ -68,6 +71,9 @@ without any intermediate rounding. `[0, -y)` otherwise. The result may not be exact if `x` and `y` have the same sign, and `abs(x) < abs(y)`. See also [`RoundFromZero`](@ref). +!!! compat "Julia 1.8" + `RoundFromZero` requires at least Julia 1.8. + # Examples: ```jldoctest julia> x = 9; y = 4; diff --git a/base/rounding.jl b/base/rounding.jl index 341fdb4495a42..8862a5fc4fef7 100644 --- a/base/rounding.jl +++ b/base/rounding.jl @@ -40,6 +40,10 @@ Currently supported rounding modes are: - [`RoundFromZero`](@ref) - [`RoundUp`](@ref) - [`RoundDown`](@ref) + +!!! compat "Julia 1.8" + `RoundFromZero` requires at least Julia 1.8. Prior versions support + `RoundFromZero` for `BigFloat`s only. """ struct RoundingMode{T} end @@ -77,13 +81,17 @@ const RoundDown = RoundingMode{:Down}() Rounds away from zero. +!!! compat "Julia 1.8" + `RoundFromZero` requires at least Julia 1.8. Prior versions support + `RoundFromZero` for `BigFloat`s only. + # Examples ```jldoctest julia> BigFloat("1.0000000000000001", 5, RoundFromZero) 1.06 ``` """ -const RoundFromZero = RoundingMode{:FromZero}() # mpfr only +const RoundFromZero = RoundingMode{:FromZero}() """ RoundNearestTiesAway