While you're considering API changes, what would you think about getting 
rid of the "xp" from derivative_rules 
here 
https://github.com/johnmyleswhite/Calculus2.jl/blob/master/src/symbolic/gradexpr.jl#L121-L186
 
?

Derivative calculations that use xp can trivially multiply by it without it 
being part of the rules table. Packages that don't use it have to put in 
extra cruft to set it to 1 or remove it from the expression 
(e.g. 
https://github.com/mlubin/ReverseDiffSparse.jl/blob/master/src/revmode.jl).



On Sunday, March 23, 2014 10:28:03 AM UTC-7, John Myles White wrote:
>
> I recently had a project where I made heavy use of the Calculus package 
> and found that the interface has really fallen out of sync with the 
> functionality that’s available. I also found myself wanting to have easier 
> access to forward-mode automatic differentation. 
>
> So I wrote up a variant of the Calculus package, which I’m calling 
> Calculus2, to provide a demonstration of a new interface that I’d like to 
> propose for the Calculus package. You can try the new interface here: 
>
> https://github.com/johnmyleswhite/Calculus2.jl 
>
> This package takes the old Calculus code and cleans it up, but also fully 
> incorporates the DualNumbers package, so that you can switch between many 
> different styles of differentiation using two keyword arguments: 
>
> using Calculus2 
> grad(sin, 1.0, method = :finite) 
> grad(sin, 1.0, method = :finite, direction = :complex) 
> grad(sin, 1.0, method = :ad) 
>
> hess(sin, 1.0, method = :finite) 
>
> I’d be really interested to see if people think this interface is worth 
> pursuing. I’m hopeful that this interface or something similar can help to 
> surface all of the useful functionality that’s been hidden inside of the 
> Calculus package. 
>
>  — John 
>
>

Reply via email to