GaussQuadIntegration: Non-adaptive Gaussian quadrature for numeric integraton

[ bsd3, library, math ] [ Propose Tags ]
Versions 0.1
Dependencies base (>=3 && <6) [details]
License BSD-3-Clause
Author Grigory Sarnitsky <>
Maintainer Grigory Sarnitsky <>
Category Math
Uploaded by GrigorySarnitsky at Thu Sep 15 14:57:26 UTC 2011
Distributions NixOS:0.1
Downloads 734 total (7 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

This package provides means for numeric integration with a Gaussian quadrature. Precisely, it incorporates non-adaptive approximation for definite integrals using 128-, 256-, 512- and 1024-point Gaussian quadrature rule. For example, to find the approximation of an integral with a 256-point rule:

╭ a
│   f(x) dx = nIntegrate256 f a b
╯ b
> nIntegrate256 (\x -> x^999) 0 1

The type of a function here is not confined only by Double -> Double, indeed one can use any instance of Fractional:

> nIntegrate256 (\x -> x^999 :: Fixed Prec50) 0 1

128 and 256 rules are given with the accuracy of 50 digits, 512 --- with 35 digits (roughly quad), all of them were computed by myself. 1024-point rule was taken from the Gauss-Legendre Quadrature C/C++ library by Pavel Holoborodko ( and goes with the accuracy of 25 decimal digits (fixed point).




Maintainer's Corner

For package maintainers and hackage trustees