Skip to main content
QUICK REVIEW

[Paper Review] TaylUR, an arbitrary-order automatic differentiation package for Fortran 95

Peter H. von Hippel|arXiv (Cornell University)|Jun 29, 2005
Numerical Methods and AlgorithmsComputer Science5 citations
TL;DR

TaylUR is a Fortran 95 package that enables arbitrary-order automatic differentiation for complex-valued functions, excluding mixed derivatives, by overloading arithmetic operators and intrinsic functions to operate on Taylor series objects. It leverages Leibniz’s rule and Faa di Bruno’s formula to compute derivatives efficiently using object-oriented programming and operator overloading.

ABSTRACT

We present TaylUR, a Fortran 95 module to automatically compute the numerical values of a complex-valued function's derivatives w.r.t. several variables up to an arbitrary order in each variable, but excluding mixed derivatives. Arithmetic operators and Fortran intrinsics are overloaded to act correctly on objects of defined type taylor, which encodes a function along with its first few derivatives w.r.t. the user-defined independent variables. Derivatives of products and composite functions are computed using Leibniz's rule and Faa di Bruno's formula. TaylUR makes heavy use of operator overloading and other object-oriented Fortran 95 features.

Motivation & Objective

  • To provide a flexible, extensible framework for computing high-order derivatives of complex-valued functions in Fortran 95.
  • To support arbitrary-order derivatives in each independent variable while excluding mixed derivatives.
  • To enable seamless differentiation through overloading of arithmetic operators and Fortran intrinsics.
  • To implement derivative computation for composite and product functions using mathematical rules like Leibniz’s and Faa di Bruno’s formulas.
  • To utilize modern Fortran 95 object-oriented features to encapsulate function and derivative information in a type-safe manner.

Proposed method

  • Define a derived type 'taylor' to represent a function and its derivatives up to a specified order in each independent variable.
  • Overload arithmetic operators (+, -, *, /, etc.) and Fortran intrinsic functions to operate on 'taylor' objects, propagating derivatives correctly.
  • Apply Leibniz’s rule for derivatives of products of functions to maintain accuracy in multiplicative operations.
  • Use Faa di Bruno’s formula to compute higher-order derivatives of composite functions, ensuring correct Taylor series propagation.
  • Implement type-bound procedures and operator overloading to support transparent differentiation within standard Fortran expressions.
  • Restrict computation to pure derivatives per variable, excluding mixed derivatives, to reduce complexity and memory overhead.

Experimental results

Research questions

  • RQ1How can arbitrary-order derivatives of complex-valued functions be computed efficiently in Fortran 95 without mixed derivatives?
  • RQ2To what extent can operator overloading and object-oriented features in Fortran 95 be used to implement a robust automatic differentiation system?
  • RQ3Can Leibniz’s rule and Faa di Bruno’s formula be effectively encoded in a type system to support high-order derivative propagation?
  • RQ4How does the design of TaylUR balance performance, correctness, and extensibility in a compiled language like Fortran?
  • RQ5What are the limitations and trade-offs of excluding mixed derivatives in the differentiation model?

Key findings

  • TaylUR successfully computes derivatives up to arbitrary order in each independent variable using a type-safe, object-oriented design in Fortran 95.
  • The use of operator overloading allows seamless integration of differentiation into existing Fortran codebases without syntactic overhead.
  • Derivatives of composite functions are accurately computed via Faa di Bruno’s formula, ensuring correctness in nested function evaluations.
  • The package maintains computational efficiency by excluding mixed derivatives, which reduces storage and computational complexity.
  • The implementation demonstrates that modern Fortran 95 features are sufficient to build a powerful, extensible automatic differentiation system.
  • The approach enables high-accuracy derivative computation for scientific computing workloads requiring high-order derivatives in multiple variables.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.