truncated_normal_rule, a Python code which computes a quadrature rule for a normal probability density function (PDF), sometimes called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].
The information on this web page is distributed under the MIT license.
truncated_normal_rule is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
python_rule, a Python code which computes a quadrature rule which estimates the integral of a function f(x), which might be defined over a one dimensional region (a line) or more complex shapes such as a circle, a triangle, a quadrilateral, a polygon, or a higher dimensional region, and which might include an associated weight function w(x).
OPTION0_TEST is a test included within the text of truncated_normal_rule.py which computes a quadrature rule for the normal distribution, n = 5, mu = 1.0, sigma = 2.0;
OPTION1_TEST is a test included within the text of truncated_normal_rule.py which computes a quadrature rule for the lower truncated normal distribution, n = 9, mu = 2.0, sigma = 0.5, a = 0.0;
OPTION2_TEST is a test included within the text of truncated_normal_rule.py which computes a quadrature rule for the upper truncated normal distribution, n = 9, mu = 2.0, sigma = 0.5, b = 3.0;
OPTION3_TEST is a test included within the text of truncated_normal_rule.py which computes a quadrature rule for the doubly truncated normal distribution, n = 5, mu = 100.0, sigma = 25.0, a = 50.0, b = 100.0;