Skip to main content

gauss_hermite

Function gauss_hermite 

Source
pub fn gauss_hermite<F>(
    f: F,
    n: usize,
    p: usize,
    rm: RoundingMode,
    cc: &mut Consts,
) -> Option<ExactNum>
Expand description

Gauss–Hermite quadrature: ∫_{-∞}^{∞} f(x) e^{-x²} dx with n nodes.

Nodes are roots of the physicist’s H_n; weights w_i = 2^{n-1} n! √π / (n² [H_{n-1}(x_i)]²). Exact for f a polynomial of degree ≤ 2n−1.