Skip to content

Commit 89fc5e8

Browse files
committed
restrict distribution of pow over * to integer powers
1 parent 1bed053 commit 89fc5e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rulesets.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const TIMES_RULES = RuleSet([
5050
])
5151

5252
const POW_RULES = RuleSet([
53-
@rule(^(*(~~x), ~y) => *(map(a->pow(a, ~y), ~~x)...))
53+
@rule(^(*(~~x), ~y::isliteral(Integer)) => *(map(a->pow(a, ~y), ~~x)...))
5454
@rule((((~x)^(~p::isliteral(Integer)))^(~q::isliteral(Integer))) => (~x)^((~p)*(~q)))
5555
@rule(^(~x, ~z::_iszero) => 1)
5656
@rule(^(~x, ~z::_isone) => ~x)

0 commit comments

Comments
 (0)