modint

Crates.iomodint
lib.rsmodint
version0.1.1
sourcesrc
created_at2017-12-30 14:09:50.811699
updated_at2017-12-30 17:55:12.075969
descriptionModular arithmetic integer
homepagehttps://github.com/0xd34d10cc/modint
repositoryhttps://github.com/0xd34d10cc/modint
max_upload_size
id44933
size8,458
(0xd34d10cc)

documentation

https://docs.rs/modint

README

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());
Commit count: 7

cargo fmt