INNER CODE UNIT · Rust

sample_below

ZenGo-X/curv · src/arithmetic/mod.rs:244

    fn sample_below() {
        let a = BigInt::from(500);

        for _ in 0..100 {
            let n = BigInt::sample_below(&a);
            assert!(n < a, "assertion failed: {:?} < {:?}", n, a);
        }
    }

    #[derive(Arbitrary, Debug, Copy, Clone)]
    enum ModOp {
        Add,
        Sub,
        Mul,
    }

    proptest::proptest! {
        #[test]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…