Functional Differentiation of Computer Programs
Abstract
We present two purely functional implementations of the computational differentiation tools -- the well known numeric (not symbolic!) techniques which permit to compute pointwise derivatives of functions defined by computer programs economically and exactly. We show how the co-recursive (lazy) algorithm formulation permits to construct in a transparent and elegant manner the entire infinite tower of derivatives of higher order for any expressions present in the program, and we present a purely functional variant of the reverse (or adjoint) mode of computational differentiation, using a chain of delayed evaluations represented by closures. Some concrete applications are also discussed.