abstract_integers 0.1.5

Defining specification-friendly bounded natural integer types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use abstract_integers::*;

abstract_signed_public_integer!(BigBounded, 256);

#[test]
#[should_panic]
fn bounded() {
    println!("BigBounded::max(): {:x}", BigBounded::max());
    let y1 = (BigBounded::pow2(255) - BigBounded::from_literal(1)) * BigBounded::from_literal(2);
    let y2 = BigBounded::from_literal(4);
    let _y3 = y1 + y2;
}