Skip to content

ghasimi/quantre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quantre

crates.io | docs.rs | github | home

Quant wheels reinvented in Rust.

Installation

cargo add quantre

Examples

// main.rs
use quantre::random;
use quantre::normal;

fn main() {
    // A random number from [0, 1)
    println!("{}", random::rand1());

    // Five random integers from -2 to 7
    println!("{:?}", random::randi(5, -2, 7));

    // Three random numbers from N(0, 1)
    println!("{:?}", random::randn(3, 0., 1.));

    // P(X <= 1.96), X ∈ N(0, 1)
    println!("{}", normal::cdf(1.96, 0., 1.));
}

Documentation

docs.rs/quantre

About

Quant wheels reinvented in Rust, e.g. RNG from Uniform and Normal distributions, Normal CDF & PDF

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages