Re:Differentiable Programming Mega-Proposal
by Certhas on Friday September 06, 2019 @08:38AM
(#20895066)
I believe a source to source differentiator could deal with all these (where well defined of course), e.g.:
https://github.com/FluxML/Zygote.jl
julia> fs = Dict("sin" => sin, "cos" => cos, "tan" => tan);
julia> gradient(x -> fs[readline()](x), 1)
sin
0.5403023058681398
But the function's derivative can't be derived by an application of the chain rule and the know derivatives of primitive functions, which is what Algorithmic/automatic differentiation ultimately does (though it does this at run time, not compile time, since ordinary, symbolic differentiation explodes in memory for a complicated functions).
Also:
The continuous function
Is not automatically or symbolically differentiable when represented that way.