@hackage numerical-integration0.1.1.0

Numerical integration.

numerical-integration

One-dimensional numerical integration using the 'NumericalIntegration' C++ library.


Example. Integrate x² between 0 and 1 with desired relative error 1e-5 and using 200 subdivisions. Exact value: 1/3.

example :: IO IntegralResult -- value, error estimate, error code
example = integration (\x -> x*x) 0 1 1e-5 200
-- IntegralResult {_value = 0.3333333333333334, _error = 3.7007434154171895e-15, _code = 0}

The error code 0 indicates the success.