JuliaDiff/ForwardDiff.jl

Forward Mode Automatic Differentiation for Julia

What it solves

ForwardDiff.jl provides a way to compute derivatives, gradients, Jacobians, and Hessians of native Julia functions. It replaces the need for manual derivation or inaccurate finite-differencing methods, offering a higher level of accuracy and speed for calculating how a function's output changes relative to its inputs.

How it works

The library implements forward-mode automatic differentiation (AD). This technique allows the package to compute exact derivatives by propagating derivatives through the function's operations using "Dual numbers."

Who it’s for

It is designed for developers and researchers using Julia who need to calculate derivatives for mathematical functions, particularly those where the function maps a scalar to a vector.

Highlights

  • Comprehensive Derivative Suite: Supports derivatives, gradients, Jacobians, and Hessians, including higher-order derivatives.
  • Performance: Generally outperforms non-AD algorithms like finite-differencing in both speed and accuracy.
  • Native Integration: Works with native Julia functions and any callable object.
  • Dependency: Leverages DiffRules.jl for the derivatives of simple functions like sin.

Related

  • Project
  • Project
  • Project
  • Project
  • Project