Automasymbolic Differentiation
jtobin.ca
jtobin.ca
[edit: There was an excellent reply here which is now deleted, which said essentially that it's not exactly nonstandard analysis. Nonstandard analysis requires you extend R to a field containing infinitesimals.
In contrast, all that is necessary here is extending R to an algebra with a nilpotent element (e^2 = 0).
You can make use of AD for more than just playing around too, esp. for optimization (JuliaOpt [4]): Optim.jl will use them to calculate exact derivatives if you don't provide them, and JuMP.jl will use them to calculate the sparse Jacobian and Hessian matrix for a nonlinearly constrained optimization problem (which can be used by, e.g. Ipopt.jl)
[1]: http://en.wikipedia.org/wiki/Automatic_differentiation
[4]: http://juliaopt.org/
The author might be interested in the theano library used to compute gradients for neural models in pylearn2. It supports performing some algebraic simplifications on the compute graph before running AD. I'm not sure if it supports exactly what's being proposed here, but it does seem to enable some interesting hybrid symbolic / automatic approaches.