Crates.io | modint |
lib.rs | modint |
version | 0.1.1 |
source | src |
created_at | 2017-12-30 14:09:50.811699 |
updated_at | 2017-12-30 17:55:12.075969 |
description | Modular arithmetic integer |
homepage | https://github.com/0xd34d10cc/modint |
repository | https://github.com/0xd34d10cc/modint |
max_upload_size | |
id | 44933 |
size | 8,458 |
Modular arithmetic integer type
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());