Skip to content

Commit 471e5f2

Browse files
integer powers
1 parent b3cdd2c commit 471e5f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/function_registration.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@ for (M, f, arity) in DiffRules.diffrules()
4141
@eval @register $sig
4242
end
4343

44-
for fun = (:<, :>, :(==), :~, :!, :&, :|, :div, :max, :min)
44+
for fun = (:<, :>, :(==), :~, :!, :&, :|, :div)
4545
basefun = Expr(:., Base, QuoteNode(fun))
4646
sig = :($basefun(x,y))
4747
@eval @register $sig
4848
end
4949

5050
# ifelse
5151
#@register Base.ifelse(cond,t,f)
52+
53+
# special cases
54+
Base.:^(x::Expression,y::T) where T <: Integer = Operation(Base.:^, Expression[x, y])

0 commit comments

Comments
 (0)