Expand description
Numerical and automatic differential calculus.
Structs§
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-analyticfunction. - damped_
newton - Damped Newton root-finding: iterates
point ← point − stepsolvingfunction(point) = 0forF: Vector<N> → Vector<N>(e.g. a gradient), with a damped step, residual-norm convergence attolerance, and amax_iterationsbound. Returns aNewtonReport(solution, iterations, residual/step norms);InvalidDomainon non-finite input or zero tolerance. - hessian
- Finite-difference
N×NHessian offatpoint: central difference on the diagonal, four-point mixed difference off-diagonal, step scaled byEPSILON^0.25 · (1+|x_i|)per dimension.InvalidDomainon non-finite base or any coefficient. - jacobian
M×NJacobian offby central finite differences per input column, stepEPSILON^(1/3) · (1+|x_j|).InvalidDomainon non-finite values.- jvp
- Jacobian-vector product
J · direction— plain matrix apply on an already-computedLinearMap. - vjp
- Vector-Jacobian product
Jᵀ · cotangent— transpose apply on an already-computedLinearMap.