Skip to content

Commit

Permalink
Add isguaranteed method for Number
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Sep 5, 2024
1 parent 3fbe805 commit 5ac275b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/intervals/construction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ isguaranteed(x::Interval) = x.isguaranteed
isguaranteed(::BareInterval) = true
isguaranteed(x::Complex{<:Interval}) = isguaranteed(real(x)) & isguaranteed(imag(x))

isguaranteed(::Number) = false

Interval{T}(x::Interval) where {T<:NumTypes} = convert(Interval{T}, x) # needed to resolve method ambiguity
# Interval{T}(x) where {T<:NumTypes} = convert(Interval{T}, x)
# Interval{T}(x::Interval{T}) where {T<:NumTypes} = convert(Interval{T}, x) # needed to resolve method ambiguity
Expand Down

0 comments on commit 5ac275b

Please sign in to comment.