13 unstable releases (3 breaking)
0.4.2 | Sep 23, 2022 |
---|---|
0.4.1 | Sep 23, 2022 |
0.3.5 | Sep 6, 2022 |
0.2.0 | Aug 30, 2022 |
0.1.2 | Aug 22, 2022 |
#908 in Math
30 downloads per month
28KB
612 lines
num_base
Crate for manipulating with numbers (integers) in different bases.
Quick start
use num_base::Based;
let num = Based::new("101", 10).to(2);
assert_eq!(num.val, "1100101")
Optional features
ops
- Implementation for Add, Sub, Mul, Div and Rem.cli
- Install with:cargo install num_base --features cli
.
lib.rs
:
Crate for manipulating with numbers (integers) in different bases.
Quick start
use num_base::Based;
let num = Based::new("101", 10).to(2).unwrap();
assert_eq!(num.val, "1100101")
Optional features
ops
- Implementation for Add, Sub, Mul, Div and Rem.cli
- Install with:cargo install num_base --features cli
.
Dependencies
~0–475KB