-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
we have a
julia> using ForwardDiff, TaylorDiff
julia> x = ForwardDiff.Dual(1, 1)
Dual{Nothing}(1,1)
julia> y = ForwardDiff.Dual(1,1)
Dual{Nothing}(1,1)
julia> TaylorDiff.derivative(z -> z*y, x, one(x), Val{3}())
ERROR: MethodError: *(::TaylorScalar{ForwardDiff.Dual{Nothing, Int64, 1}, 3}, ::ForwardDiff.Dual{Nothing, Int64, 1}) is ambiguous.
Candidates:
*(a::TaylorScalar, b::Number)
@ TaylorDiff ~\.julia\packages\TaylorDiff\N6Pcf\src\primitive.jl:119
*(x::Real, y::ForwardDiff.Dual{Ty}) where Ty
@ ForwardDiff ~\.julia\packages\ForwardDiff\Or6Qh\src\dual.jl:149
Possible fix, define
*(::TaylorScalar, ::ForwardDiff.Dual{Ty}) where Ty
Can we force the choice here between the two somehow, so the code goes through ? eg by defining
*(::TaylorScalar{ForwardDiff.Dual{Ty}}, ::ForwardDiff.Dual{Ty}) where Ty
?
Metadata
Metadata
Assignees
Labels
No labels