Skip to main content

Module differential

Module differential 

Source
Expand description

Numerical and automatic differential calculus.

Structs§

DerivativeEstimate
Dual
NewtonReport

Functions§

adaptive_central_difference
Central-difference derivative with adaptive step refinement until the error estimate converges; returns estimate + error bound.
complex_step_derivative
Complex-step derivative Im(f(x+ih))/h — machine-precision accuracy for real-analytic function.
damped_newton
Damped Newton root-finding: iterates point ← point − step solving function(point) = 0 for F: Vector<N> → Vector<N> (e.g. a gradient), with a damped step, residual-norm convergence at tolerance, and a max_iterations bound. Returns a NewtonReport (solution, iterations, residual/step norms); InvalidDomain on non-finite input or zero tolerance.
hessian
Finite-difference N×N Hessian of f at point: central difference on the diagonal, four-point mixed difference off-diagonal, step scaled by EPSILON^0.25 · (1+|x_i|) per dimension. InvalidDomain on non-finite base or any coefficient.
jacobian
M×N Jacobian of f by central finite differences per input column, step EPSILON^(1/3) · (1+|x_j|). InvalidDomain on non-finite values.
jvp
Jacobian-vector product J · direction — plain matrix apply on an already-computed LinearMap.
vjp
Vector-Jacobian product Jᵀ · cotangent — transpose apply on an already-computed LinearMap.