Crates.io | eint |
lib.rs | eint |
version | 1.0.0 |
source | src |
created_at | 2022-02-13 12:13:06.136398 |
updated_at | 2022-09-11 07:47:26.87764 |
description | Fixed-size signed/unsigned big integers. |
homepage | |
repository | https://github.com/mohanson/eint |
max_upload_size | |
id | 531735 |
size | 76,284 |
Extended precision integer Rust library. Provides signed/unsigned integer 256 to 2048.
[dependencies]
eint = "0.1"
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
$ cargo test
# Fuzzing
$ cargo +nightly fuzz run arith_e64
$ cargo +nightly fuzz run arith_e256
# Bench
$ cargo bench
MIT.