JuliaDiff / DualNumbers.jl

Julia package for representing dual numbers and for performing dual algebra
Other
80 stars 30 forks source link

Calculus.symbolic_derivative_1arg_list masking some definitions #30

Closed goretkin closed 8 years ago

goretkin commented 8 years ago

I might be confused, but

julia> @which abs2(Dual(1.0,1.0))
abs2(z::DualNumbers.Dual{T<:Real}) at /Users/goretkin/.julia/v0.4/DualNumbers/src/dual.jl:186

https://github.com/JuliaDiff/DualNumbers.jl/blob/v0.1.5/src/dual.jl#L186 which is masking a previous definition on https://github.com/JuliaDiff/DualNumbers.jl/blob/v0.1.5/src/dual.jl#L122

MikaelSlevinsky commented 8 years ago

This should be taken care of by #29.

ScottPJones commented 8 years ago

This still seems to be a problem, at least on v0.5 master, even with #29 merged. I get this warning:

julia> using DualNumbers
INFO: Precompiling module DualNumbers...
WARNING: Method definition abs2(DualNumbers.Dual4) in module DualNumbers at /Users/scott/.julia/v0.5/DualNumbers/src/dual_n.jl:78 overwritten at /Users/scott/.julia/v0.5/DualNumbers/src/dual_n.jl:154.
MikaelSlevinsky commented 8 years ago

This line was added in dual.jl to skip abs2. Perhaps the same could be done in dual_n.jl