8 releases
| 0.2.3 | Apr 7, 2026 |
|---|---|
| 0.2.2 | Jul 1, 2024 |
| 0.2.1 | Jan 1, 2023 |
| 0.2.0 | Aug 29, 2022 |
| 0.1.0 | Jan 3, 2022 |
#188 in Text processing
40,183 downloads per month
Used in 21 crates
(8 directly)
29KB
767 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;
let pdf = Normal::pdf(x, mean, std_dev);
let cdf = Normal::cdf(x, mean, std_dev);
let ppf = Normal::ppf(p, mean, std_dev);
Student’s t
use distrs::StudentsT;
let pdf = StudentsT::pdf(x, df);
let cdf = StudentsT::cdf(x, df);
let ppf = StudentsT::ppf(p, df);
Features
no_std- enableno_stdsupport (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
~145KB