hmatrix-0.8.3.1: Linear algebra and numerical computationSource codeContentsIndex
Numeric.GSL.Integration
Portabilityuses ffi
Stabilityprovisional
MaintainerAlberto Ruiz (aruiz at um dot es)
Description

Numerical integration routines.

http://www.gnu.org/software/gsl/manual/html_node/Numerical-Integration.html#Numerical-Integration

Synopsis
integrateQNG :: Double -> (Double -> Double) -> Double -> Double -> (Double, Double)
integrateQAGS :: Double -> Int -> (Double -> Double) -> Double -> Double -> (Double, Double)
Documentation
integrateQNGSource
:: Doubleprecision (e.g. 1E-9)
-> Double -> Doublefunction to be integrated on the interval (a,b)
-> Doublea
-> Doubleb
-> (Double, Double)result of the integration and error

Numerical integration using gsl_integration_qng (useful for fast integration of smooth functions). For example:

> let quad = integrateQNG 1E-6 
> quad (\x -> 4/(1+x*x)) 0 1 
(3.141592653589793,3.487868498008632e-14)
integrateQAGSSource
:: Doubleprecision (e.g. 1E-9)
-> Intsize of auxiliary workspace (e.g. 1000)
-> Double -> Doublefunction to be integrated on the interval (a,b)
-> Doublea
-> Doubleb
-> (Double, Double)result of the integration and error

Numerical integration using gsl_integration_qags (adaptive integration with singularities). For example:

> let quad = integrateQAGS 1E-9 1000 
> let f a x = x**(-0.5) * log (a*x)
> quad (f 1) 0 1
(-3.999999999999974,4.871658632055187e-13)
Produced by Haddock version 2.6.0