Uses old Rust 2015
0.0.7-alpha.3 |
|
---|---|
0.0.7-alpha.2 |
|
#27 in #unsigned
21KB
514 lines
rust-nonsmallint
Basic arithmetic for unsigned arbitrarily-sized integers in pure Rust
Usage
Add it to your project dependencies in Cargo.toml
:
[dependencies]
nonsmallnum = "0.0.6"
Examples
extern crate nonsmallnum;
use nonsmallnum::NonSmallInt;
fn main() {
let x = NonSmallInt::parse("4236523").expect("Failed to parse a non-small number");
let y = NonSmallInt::of(43);
println!("{} + {} == {}", x, y, &x + &y);
println!("{} - {} == {}", x, y, &x - &y);
println!("{} * {} == {}", x, y, &x * &y);
println!("{} / {} == {}", x, y, &x / &y);
println!("{} % {} == {}", x, y, &x % &y);
println!("{} < {} == {}", x, y, &x < &y);
}
API Doc
You can find API doc of the latest release here.