RustQuant 0.0.4

A Rust library for quantitative finance tools.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Helper macro for tests to test floating point approximate equality.
#[macro_export]
macro_rules! assert_approx_equal {
    ($x:expr, $y:expr, $d:expr) => {
        assert!(
            ($x - $y <= $d) && ($y - $x <= $d),
            "\nLeft: \t{}, \nRight: \t{}, \nDelta: \t{}\n",
            $x,
            $y,
            $d
        )
    };
}