Dual Number Automatic Differentiation

By Wenbin Yu1, kshitiz swaroop1

1. Purdue University


This resource requires you to log in before you can proceed with the download.

Licensed under



Published on


DNAD (dual number automatic differentiation) is a simple, general-purpose tool to automatically differentiate Fortran codes written in modern Fortran (F90/ 95/2003) or legacy codes written in previous version of the Fortran language. It implements the forward mode of automatic differentiation using the arithmetic of dual numbers and the operator overloading feature of F90/ 95/2003. Very minimum changes of the source codes are needed to compute the first derivatives of Fortran programs. The advantages of DNAD in comparison to other existing similar computer codes are its programming simplicity, extensibility, and computational efficiency. Specifically, DNAD is more accurate and efficient than the popular complex-step approximation. 

Cite this work

Researchers should cite this work as follows:

  • Wenbin Yu; kshitiz swaroop (2014), "Dual Number Automatic Differentiation," https://cdmhub.org/resources/374.

    BibTex | EndNote