Higher-Order and Symbolic Computation, 14(1)35-57

Functional Differentiation of Computer Programs

Jerzy Karczmarczuk, Department of Computer Science, University of Caen, Sciences III, Bd. Maréchal Juin, 14032 Caen, France

Abstract: We present a purely functional implementation of the computational differentiation tools -- the well known numeric (i.e., not symbolic) techniques which permit one to compute point-wise derivatives of functions defined by computer programs economically and exactly (with machine precision). We show how the use of lazy evaluation permits a transparent and elegant construction of the entire infinite tower of derivatives of higher order for any expressions present in the program. The formalism may be useful in various problems of scientific computing which often demand a hard and ungracious human preprocessing before writing the final code. Some concrete examples are given.

Keywords: Haskell, differentiation, arithmetic, lazy semantics

This article can be downloaded [here].
[picture of journal cover]

July 2003 - hosc@brics.dk