numeric library Null safety

Numeric algorithms and solutions.

Functions

derivative(double f(double), double x, {int derivative = 1, int accuracy = 2, double epsilon = 1e-5}) double
Returns the numerical derivative of the provided function f at x.
integrate(double f(double), double a, double b, {int depth = 6, double epsilon = 1e-6, Iterable<double> poles = const [], void onWarning(IntegrateWarning, double)?}) double
Returns the numerical integration of the provided function f from a to b, that is the result of int(f(x), dx=a..b).
solve(double f(double), double a, double b, {double bracketEpsilon = 1e-10, double solutionEpsilon = 1e-50, int maxIterations = 50}) double
Returns the root of the provided function f bracketed between a and b, that is f(x) = 0 is solved for x in the range of a, b.

Enums

IntegrateWarning
Integration warnings that can be triggered for badly behaving functions or ill defined parameters.

Exceptions / Errors

IntegrateError
Integration error that is thrown when warnings are not handled explicitly.