Reference
Hyams, D.G., “Using Dual Numbers for Automatic Derivative Calculation,” Lecture notes on Parallel Scientific Supercomputing, Spring 2013 [Download PDF]