You can email me if you want to, I'll be happy to help.
use integrate::{ gauss_quadrature::hermite::gauss_hermite_rule, }; use statrs::distribution::{Continuous, Normal}; fn dnorm(x: f64) -> f64 { Normal::new(0.0, 1.0).unwrap().pdf(x)* x.powi(2).exp() } fn main() { let n: usize = 170; let result = gauss_hermite_rule(dnorm, n); println!("Result: {:?}", result); }
this method is much faster and simpler.
You can email me if you want to, I'll be happy to help.