fraction-tools 0.1.0
Exact rational numbers with checked arithmetic
Install
cargo add fraction-tools --registry rupm
In Ruststudio: Packages, search for fraction-tools, Install.
Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-22.
Versions
- 0.1.0 2026-11-22
README
# fraction-tools Exact rational numbers with checked arithmetic Add it with `rupm add fraction-tools` (or `cargo add fraction-tools --registry rupm`). ```rust let a = fraction_tools::Fraction::new(1, 3)?; let b = fraction_tools::Fraction::new(1, 6)?; assert_eq!(a.checked_add(b)?.to_string(), "1/2"); ```