#unsigned #integer #basic #arithmetic #pure #arbitrarily-sized #non-small-int

yanked nonsmallnum

Basic arithmetic for unsigned arbitrarily-sized integers in pure Rust

Uses old Rust 2015

0.0.7-alpha.3 Oct 22, 2017
0.0.7-alpha.2 Oct 14, 2017

#27 in #unsigned

MIT license

21KB
514 lines

Build Status crates.io

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.

No runtime deps