diff --git a/src/intervals/functions.jl b/src/intervals/functions.jl index 6d2b51de3..b8a371abc 100644 --- a/src/intervals/functions.jl +++ b/src/intervals/functions.jl @@ -211,11 +211,11 @@ function ^(x::Interval, n::Integer) # fast integer power power_by_squaring(mag(x), n, RoundUp)) elseif x.lo > 0 - return Interval(power_by_squaring(x.lo, n, RoundUp), + return Interval(power_by_squaring(x.lo, n, RoundDown), power_by_squaring(x.hi, n, RoundUp)) else # x.lo < x.hi < 0 - return Interval(power_by_squaring(-x.hi, n, RoundUp), + return Interval(power_by_squaring(-x.hi, n, RoundDown), power_by_squaring(-x.lo, n, RoundUp)) end