Skip to content

Commit e98e5a6

Browse files
committed
Mark ^(x::Float64, n::Integer) as locally terminating
1 parent 2263342 commit e98e5a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/math.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export sin, cos, sincos, tan, sinh, cosh, tanh, asin, acos, atan,
1818
import .Base: log, exp, sin, cos, tan, sinh, cosh, tanh, asin,
1919
acos, atan, asinh, acosh, atanh, sqrt, log2, log10,
2020
max, min, minmax, ^, exp2, muladd, rem,
21-
exp10, expm1, log1p, @constprop
21+
exp10, expm1, log1p, @constprop, @assume_effects
2222

2323
using .Base: sign_mask, exponent_mask, exponent_one,
2424
exponent_half, uinttype, significand_mask,
@@ -1033,7 +1033,7 @@ end
10331033
return pow_body(x, n)
10341034
end
10351035

1036-
@noinline function pow_body(x::Float64, n::Integer)
1036+
@assume_effects :terminates_locally @noinline function pow_body(x::Float64, n::Integer)
10371037
y = 1.0
10381038
xnlo = ynlo = 0.0
10391039
if n < 0

0 commit comments

Comments
 (0)