TBit-0.4.2.3: Utilities for condensed matter physics tight binding calculations.

Safe HaskellNone
LanguageHaskell98

TBit.Numerical.Integration

Synopsis

Documentation

integrate :: (Integrable r, CurryBounds (Bounds r)) => r -> Curried (Bounds r) Res Source

Integrate a function of n variables by giving the corresponding n integration domains, i.e.

let f x y z = x^2 + log (y-z)
integrate f (0,1) (3,4) (1,2)

This code was borrowed from the excellent answer at http://stackoverflow.com/questions/23703360/using-numeric-integration-tanhsinh-for-n-dimensional-integration.

The integration uses the Tanh-Sinh quadrature method and relies on Kmett's integration libary.