Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mohanson/eint

Extended precision integer Rust library. Provides signed/unsigned integer 256 to 2048.
https://github.com/mohanson/eint

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# Eint

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

```text
[dependencies]
eint = "1.0"
```

# Usage

```rs
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/](https://docs.rs/eint/latest/eint/)

# Test

```sh
# Test
$ cargo test

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

# Bench
$ cargo bench
```

# Maintainer

[email protected]

# License

MIT.