#mathematics #numerics #fractions

no-std num-rational

Rational numbers implementation for Rust

16 releases

0.3.2 Nov 6, 2020
0.3.0 Jun 13, 2020
0.2.4 Mar 17, 2020
0.2.2 Jun 11, 2019
0.1.32 Apr 14, 2016

#84 in Math

Download history 85912/week @ 2020-08-07 86111/week @ 2020-08-14 92643/week @ 2020-08-21 90114/week @ 2020-08-28 91509/week @ 2020-09-04 97714/week @ 2020-09-11 95714/week @ 2020-09-18 103146/week @ 2020-09-25 104999/week @ 2020-10-02 103203/week @ 2020-10-09 101522/week @ 2020-10-16 107940/week @ 2020-10-23 113320/week @ 2020-10-30 110870/week @ 2020-11-06 113616/week @ 2020-11-13 113306/week @ 2020-11-20

423,738 downloads per month
Used in 2,343 crates (58 directly)

MIT/Apache

110KB
2.5K SLoC

num-rational

crate documentation minimum rustc 1.31 build status

Generic Rational numbers (aka fractions) for Rust.

Usage

Add this to your Cargo.toml:

[dependencies]
num-rational = "0.3"

Features

This crate can be used without the standard library (#![no_std]) by disabling the default std feature. Use this in Cargo.toml:

[dependencies.num-rational]
version = "0.3"
default-features = false

Releases

Release notes are available in RELEASES.md.

Compatibility

The num-rational crate is tested for rustc 1.31 and greater.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~135–320KB