7 releases
0.2.2 | Jul 1, 2024 |
---|---|
0.2.1 | Jan 1, 2023 |
0.2.0 | Aug 29, 2022 |
0.1.3 | Jul 31, 2022 |
0.1.0 | Jan 3, 2022 |
#106 in Math
2,971 downloads per month
Used in 12 crates
(8 directly)
26KB
544 lines
Dist Rust
PDF, CDF, and percent-point/quantile functions for the normal and Student’s t distributions
🎉 Zero dependencies
Installation
Add this line to your application’s Cargo.toml
under [dependencies]
:
distrs = "0.2"
Getting Started
Normal
use distrs::Normal;
Normal::pdf(x, mean, std_dev);
Normal::cdf(x, mean, std_dev);
Normal::ppf(p, mean, std_dev);
Student’s t
use distrs::StudentsT;
StudentsT::pdf(x, df);
StudentsT::cdf(x, df);
StudentsT::ppf(p, df);
Features
no_std
- enableno_std
support (requires libm)
References
- Algorithm AS 241: The Percentage Points of the Normal Distribution
- Algorithm 395: Student’s t-distribution
- Algorithm 396: Student’s t-quantiles
History
View the changelog
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/dist-rust.git
cd dist-rust
cargo test
Dependencies
~98KB