Skip to content

Commit b3660a0

Browse files
committed
Improve numtype docstring and error message for ==
1 parent 7f57329 commit b3660a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/intervals/real_interface.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"""
22
numtype(T)
33
4-
Return the bounds type of the interval.
4+
Return the bound type of the interval.
55
66
# Examples
77
88
```jldoctest
9-
julia> IntervalArithmetic.numtype(interval(1, 2))
9+
julia> numtype(interval(1, 2))
1010
Float64
1111
12-
julia> IntervalArithmetic.numtype(interval(Float32, 1, 2))
12+
julia> numtype(interval(Float32, 1, 2))
1313
Float32
1414
```
1515
"""
@@ -83,7 +83,7 @@ for T ∈ (:BareInterval, :Interval)
8383
function Base.:(==)(x::$T, y::$T) # also returned when calling `≤`, `≥`, `isequal`
8484
isthin(x) && return sup(x) == y
8585
isthin(y) && return x == sup(y)
86-
return throw(ArgumentError("`==` is purposely not supported for intervals. See instead `isequal_interval`"))
86+
return throw(ArgumentError("`==` is purposely not supported when the intervals are overlapping. See instead `isequal_interval`"))
8787
end
8888

8989
Base.:<(::$T, ::$T) = # also returned when calling `isless`, `>`
@@ -138,7 +138,7 @@ Base.union!(::AbstractVector{S}, ::Interval, ::BareInterval, ::Any...) where {S}
138138
throw(ArgumentError("`union!` is purposely not supported for intervals. See instead `hull`"))
139139

140140

141-
# allow pointwise equality
141+
# pointwise equality
142142

143143
"""
144144
==(::BareInterval, ::Number)

0 commit comments

Comments
 (0)