Skip to content

Commit 12d1a6c

Browse files
authored
Fix literal powers (#173)
1 parent 59ef14d commit 12d1a6c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/intervals/functions.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ end
1313

1414
# Integer power:
1515

16-
# overwrite new behaviour for small integer powers:
17-
# ^{p}(x::IntervalArithmetic.Interval, ::Type{Val{p}}) = x^p
16+
# overwrite new behaviour for small integer powers from
17+
# https://github.com/JuliaLang/julia/pull/24240:
18+
19+
Base.literal_pow(::typeof(^), x::Interval{T}, ::Val{p}) where {T,p} = x^p
20+
1821

1922
function ^(a::Interval{BigFloat}, n::Integer)
2023
isempty(a) && return a

0 commit comments

Comments
 (0)