12 releases (1 stable)

1.0.0 Sep 11, 2022
0.1.10 Aug 15, 2022
0.1.8 Jul 13, 2022
0.1.7 Jun 22, 2022
0.1.3 Feb 28, 2022

#145 in No standard library

Download history 3/week @ 2024-02-15 9/week @ 2024-02-22 5/week @ 2024-02-29 12/week @ 2024-03-07 7/week @ 2024-03-14 31/week @ 2024-03-28 24/week @ 2024-04-04 2/week @ 2024-04-11

57 downloads per month

MIT license

52KB
1K SLoC

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.


lib.rs:

Eint

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

[dependencies]
eint = "0.1"

Dependencies

~245KB