numerical/differentiation library

High-accuracy numerical differentiation utilities.

Provides high-order finite difference derivative approximations and a Richardson extrapolation wrapper to increase accuracy. Designed for production use where precision and stability matter.

Example:

final d = derivative((x) => math.sin(x), 0.0);

Functions

derivative(double f(double), double x, {double h = 1e-4, bool richardson = true}) double
Compute derivative f'(x) using a high-order central finite-difference.