dace 0.2.1

Rust wrapper of DACE, the Differential Algebra Computational Toolbox.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use dace::*;

// This requires a LAPACK binding for ndarray-linalg, see the README.
fn main() {
    DA::init(10, 1);

    let x = da!(1);

    // Compute Taylor expansion of sin(x)
    let y = x.sin();

    // Invert Taylor polynomial
    let inv_y = darray![y].invert().unwrap();

    // Compare with asin(x)
    println!("Polynomial inversion of sin(x)\n{inv_y}\n");
    println!("asin(x)\n{}", x.asin());
}