Functional Differentiation of Computer Programs

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.

[1]  Jerzy Karczmarczuk Functional Programming and Mathematical Objects , 1995, FPLE.

[2]  Irene A. Stegun,et al.  Handbook of Mathematical Functions. , 1966 .

[3]  Donald E. Knuth,et al.  The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .

[4]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[5]  Jerzy Karczmarczuk,et al.  Functional Differentiation of Computer Programs , 1998, ICFP '98.

[6]  Jerzy Karczmarczuk,et al.  Generating Power of Lazy Semantics , 1997, Theor. Comput. Sci..

[7]  Andreas Griewank,et al.  Algorithm 755: ADOL-C: a package for the automatic differentiation of algorithms written in C/C++ , 1996, TOMS.

[8]  Thomas Kaminski,et al.  Recipes for adjoint code construction , 1998, TOMS.

[9]  Christian H. Bischof,et al.  E cient Derivative Codes through AutomaticDi erentiation and Interface Contraction : AnApplication in Biostatistics , 1995 .

[10]  Jerzy Karczmarczuk Functional Coding of Differential Forms , 1999 .

[11]  I. Kaplansky An introduction to differential algebra , 1957 .

[12]  Gaston H. Gonnet,et al.  On the LambertW function , 1996, Adv. Comput. Math..

[13]  C. Bendtsen FADBAD, a flexible C++ package for automatic differentiation - using the forward and backward method , 1996 .

[14]  Jerzy Karczmarczuk,et al.  Adjoint Codes in Functional Framework , 2000 .

[15]  Milton Abramowitz,et al.  Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables , 1964 .

[16]  S. Orszag,et al.  Advanced Mathematical Methods For Scientists And Engineers , 1979 .