Skip to content

Commit 04100ab

Browse files
committed
Allow convert(::Complex{<:Interval}, ::Interval) without "NG" flag
1 parent 6c26d7a commit 04100ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/intervals/construction.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,9 @@ function Base.convert(::Type{Interval{T}}, x::Complex{<:Interval}) where {T<:Num
567567
return convert(Interval{T}, real(x))
568568
end
569569

570+
Base.convert(::Type{Complex{Interval{T}}}, x::Interval) where {T<:NumTypes} =
571+
interval(T, complex(x))
572+
570573
Base.convert(::Type{Interval{T}}, x::AbstractIrrational) where {T<:NumTypes} =
571574
interval(T, x) # always guaranteed since an `AbstractIrrational` is a defined fixed constant
572575

0 commit comments

Comments
 (0)