eint

Crates.ioeint
lib.rseint
version1.0.0
sourcesrc
created_at2022-02-13 12:13:06.136398
updated_at2022-09-11 07:47:26.87764
descriptionFixed-size signed/unsigned big integers.
homepage
repositoryhttps://github.com/mohanson/eint
max_upload_size
id531735
size76,284
Mohanson (mohanson)

documentation

README

Eint

Extended precision integer Rust library. Provides signed/unsigned integer 256 to 2048.

[dependencies]
eint = "0.1"

Usage

use eint::{E256, Eint};

fn main() {
    let a = E256::from(u128::MAX);
    let b = E256::from(u128::MAX);
    println!("    a = {:?}", a);
    println!("    b = {:?}", a);
    println!("a + b = {:?}", a + b);
    println!("a - b = {:?}", a - b);
    println!("a * b = {:?}", a * b);
    println!("a / b = {:?}", a / b);
    println!("a.ctz = {:?}", a.ctz());
}

Full docs: https://docs.rs/eint/latest/eint/

Test

# Test
$ cargo test

# Fuzzing
$ cargo +nightly fuzz run arith_e64
$ cargo +nightly fuzz run arith_e256

# Bench
$ cargo bench

Maintainer

mohanson@outlook.com

License

MIT.

Commit count: 32

cargo fmt