3 ms·
This is very similar to dual numbers [1] which I find even easier to reason about. There is an implementation of dual numbers in Julia [2] that is quite fun to
by idunning 12y ago
This is very similar to dual numbers [1] which I find even easier to reason about.
There is an implementation of dual numbers in Julia [2] that is quite fun to play around with. The Optim.jl package [3] uses this to get better derivatives than finite differencing.
[1] http://en.wikipedia.org/wiki/Dual_number http://en.wikipedia.org/wiki/Dual_number
[2] https://github.com/JuliaDiff/DualNumbers.jl https://github.com/JuliaDiff/DualNumbers.jl
[3] https://github.com/JuliaOpt/Optim.jl https://github.com/JuliaOpt/Optim.jl