-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
julia> using IntervalArithmetic
julia> x = interval(-4, -2)
[-4.0, -2.0]_com
julia> pow(x, 2)
∅_trv
The problem seems to be in these lines:
IntervalArithmetic.jl/src/intervals/arithmetic/power.jl
Lines 157 to 159 in 544c000
domain = _unsafe_bareinterval(T, zero(T), typemax(T)) | |
x = intersect_interval(x, domain) | |
isempty_interval(x) && return emptyinterval(BareInterval{R}) |
It is unclear to me why domain
should be nonnegative. Clearly you can take a power of a negative number.