2 releases
Uses old Rust 2015
0.1.1 | Dec 30, 2017 |
---|---|
0.1.0 | Dec 30, 2017 |
#19 in #modular-arithmetic
8KB
202 lines
modint
Modular arithmetic integer type
Example
use typenum::U17;
type M17 = Unsigned<u8, U17>;
assert_eq!(M17::from(16) + 14.into(), 13.into());
assert_eq!(M17::from(11) - 15.into(), 13.into());
assert_eq!(M17::from(11) * 15.into(), 12.into());
assert_eq!(M17::from(13) / 4 .into(), 3.into());
Dependencies
~395KB