peroxide 0.41.0

Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use peroxide::fuga::*;

#[test]
fn test_cosine_integral() {
    let a = 0.0;
    let b = 1.0;
    let result = integrate(|x| x.cos(), (a, b), G7K15R(1e-8, 20));
    let expected = 1f64.sin();
    assert!(
        (result - expected).abs() < 1e-10,
        "Expected: {}, Got: {}",
        expected,
        result
    );
}