slatec 0.1.0

Safe Rust interface to selected SLATEC numerical routines
1
2
3
4
5
6
7
8
9
10
fn main() {
    let result = slatec::quadrature::integrate(
        |x| x * x,
        0.0,
        1.0,
        slatec::quadrature::IntegrationOptions::default(),
    )
    .expect("smooth finite integral");
    assert!((result.value - 1.0 / 3.0).abs() < 1.0e-10);
}