@@ -35,10 +35,10 @@ Interval{Float64}
3535default_bound () = Float64
3636
3737# Produce the type of the bounds of an interval when not explicitly imposed
38- boundstype (:: Type{T} , :: Type{S} ) where {T<: AbstractFloat , S<: AbstractFloat } = promote_type (T, S)
39- boundstype (:: Type{T} , :: Type{S} ) where {T<: AbstractFloat , S} = promote_type (T, S)
40- boundstype (:: Type{T} , :: Type{S} ) where {T, S<: AbstractFloat } = promote_type (T, S)
41- boundstype (:: Type{T} , :: Type{S} ) where {T, S} = promote_type (default_bound (), T, S)
38+ getnumtype (:: Type{T} , :: Type{S} ) where {T<: AbstractFloat , S<: AbstractFloat } = promote_type (T, S)
39+ getnumtype (:: Type{T} , :: Type{S} ) where {T<: AbstractFloat , S} = promote_type (T, S)
40+ getnumtype (:: Type{T} , :: Type{S} ) where {T, S<: AbstractFloat } = promote_type (T, S)
41+ getnumtype (:: Type{T} , :: Type{S} ) where {T, S} = promote_type (default_bound (), T, S)
4242
4343@inline _normalisezero (a:: Real ) = ifelse (iszero (a), zero (a), a)
4444
@@ -94,7 +94,7 @@ function interval(::Type{T}, a, b) where {T}
9494 @warn " Invalid input, empty interval is returned"
9595 return emptyinterval (T)
9696end
97- interval (a:: T , b:: S ) where {T, S} = interval (boundstype (T, S), a, b)
97+ interval (a:: T , b:: S ) where {T, S} = interval (getnumtype (T, S), a, b)
9898
9999# Real: `is_valid_interval(a, a) != true`
100100interval (:: Type{T} , a:: Real ) where {T} = interval (T, a, a)
0 commit comments