3个版本
0.1.2 | 2023年11月30日 |
---|---|
0.1.1 | 2023年11月3日 |
0.1.0 | 2023年5月4日 |
612 在 数学
每月下载量:29
用于 sketches-rust
260KB
5.5K SLoC
rust-strictmath
该crate受java StrictMath 的启发。如果获得完全可预测的结果比运行速度更重要,则应使用此crate。此crate提供一系列浮点函数,以确保它们可以在不同的平台上产生相同的结果。这些算法来自知名的网络库 fdlibm。
函数
- acos
- asin
- atan
- atan2
- cbrt
- cos
- cosh
- exp
- expm1
- hypot
- log
- log10
- log1p
- pow
- sin
- sinh
- sqrt
- tan
- tanh
用法
在项目目录中运行以下Cargo命令
cargo add rust-strictmath
或者将以下行添加到您的Cargo.toml中
rust-strictmath = "0.1.2"
无运行时依赖
~0–2MB
~40K SLoC