Closed Anixx closed 2 years ago
Thanks for the input. That's an interesting suggestion, but I doubt that this approach scales very well for the purpose of automatic differentiation in programs. For example, it does not work with the example in the Readme document. Also: programming with $Pre
isn't very robust, I would say.
This one:
$Pre=MatrixFunction[Function[ε,#],{{0,0},{1,0}}]/.{{a_,b_},{0,a_}}->a+ε b /.{{a_,0},{b_,a_}}->a+ε b&;
After this, most built-in functions work with dual numbers: