Quadriceps.jl

Paper and data deposit

Joris Pinkse, Positive weight Hermite and Legendre quadrature rules (2026), arXiv:2609.26840; Zenodo, DOI: 10.5281/zenodo.22904159; the rules to 80 digits, Zenodo, DOI: 10.5281/zenodo.22881864.

Positive-weight cubature rules in several dimensions, for the Gaussian weight and for the uniform weight on the cube.

A cubature rule of degree $p$ for a weight $ω$ on $\mathbb{R}^d$ is a set of nodes $x_1, …, x_n$ and weights $w_1, …, w_n$ with

\[\sum_{i=1}^n w_i f(x_i) = \int f(x)\, ω(x)\, dx \qquad \text{for every polynomial } f \text{ of total degree} ≤ p .\]

Positive weights matter in practice: the rule is then a discrete probability distribution (up to scale), sums do not cancel, and an integrand that is nonnegative has a nonnegative approximate integral.

The product of one-dimensional Gauss rules is such a rule with $q^d$ nodes, where $q = (p+1)/2$. The rules in this package need far fewer:

cellproduct gridstored rule
GH, $d = 3$, $q = 4$6427
GH, $d = 5$, $q = 5$3125244
GH, $d = 5$, $q = 11$16105113199
Le, $d = 2$, $q = 39$15211032
Le, $d = 5$, $q = 11$16105110984

The package exports two functions, ghpos and lepos, modeled on gausshermite(q) and gausslegendre(q) from FastGaussQuadrature.jl: q is the number of nodes of the one-dimensional Gauss rule, and the rule returned has its degree, $p = 2q - 1$.

using Quadriceps

X, w = ghpos(3, 4)          # 27 nodes for N(0, I₃), as exact as the 4×4×4 Gauss–Hermite grid (degree 7)
X, w = lepos(2, 5)          # 17 nodes for the uniform density on [0,1]², degree 9
X, w = ghpos(3; p = 7)      # the first rule again, requested by degree
  • Guide: conventions, the two keyword arguments, accuracy.
  • Stored rules: every rule, with its node count, Möller's bound, error and origin.
  • Data format: the single binary file that holds the rules.
  • Reference: docstrings.
  • Credits: whose rules these are, and what to cite.