julia> grad(x->x^3)(1)
ERROR: MethodError: ^(::AutoGrad.Rec{Int64}, ::Int64) is ambiguous. Candidates:
^(x, p::Integer) in Base at intfuncs.jl:199
^(x1::AutoGrad.Rec{##1045}, x2::##1046) where {##1045<:Number, ##1046<:Number} in AutoGrad
Possible fix, define
^(::AutoGrad.Rec{##1045<:Number}, ::Integer)
Stacktrace:
[1] (::##13#14)(::AutoGrad.Rec{Int64}) at ./REPL[9]:1
[2] forward_pass(::Function, ::Tuple{Int64}, ::Array{Any,1}, ::Int64) at /home/carlo/.julia/v0.6/AutoGrad/src/core.jl:88
[3] (::AutoGrad.##gradfun#1#3{##13#14,Int64})(::Array{Any,1}, ::Function, ::Int64, ::Vararg{Int64,N} where N) at /home/carlo/.julia/v0.6/AutoGrad/src/core.jl:39
[4] (::AutoGrad.#gradfun#2)(::Int64, ::Vararg{Int64,N} where N) at /home/carlo/.julia/v0.6/AutoGrad/src/core.jl:39
[5] macro expansion at /home/carlo/.julia/v0.6/Revise/src/Revise.jl:775 [inlined]
[6] (::Revise.##17#18{Base.REPL.REPLBackend})() at ./event.jl:73
when both
x
andn
are integers: