QUADRULE is a Python library which sets up a variety of quadrature rules, used to approximate the integral of a function over various domains in 1D.
QUADRULE returns the abscissas and weights for a variety of one dimensional quadrature rules for approximating the integral of a function. The best rule is generally Gauss-Legendre quadrature, but other rules offer special features, including the ability to handle certain weight functions, to approximate an integral on an infinite integration region, or to estimate the approximation error.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
QUADRULE is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a Python version.
KRONROD, a Python library which can compute a Gauss and Gauss-Kronrod pair of quadrature rules of arbitrary order, by Robert Piessens, Maria Branders.
TRUNCATED_NORMAL, a Python library which works with the truncated normal distribution over [A,B], or [A,+oo) or (-oo,B], returning the probability density function (PDF), the cumulative density function (CDF), the inverse CDF, the mean, the variance, and sample values.
TRUNCATED_NORMAL_RULE, a Python program which computes a quadrature rule for a normal distribution that has been truncated to [A,+oo), (-oo,B] or [A,B].
You can go up one level to the Python source codes.