pub fn add_mod<T>(a: &T, b: &T, modulo: &T) -> TExpand description
$a + b \bmod n$
Input: $-\text{modulo} \leq a,\, b \leq \text{modulo}$
Output: $-\text{modulo} \leq x \leq \text{modulo}$
use modulo_n_tools::add_mod;
assert_eq!(add_mod(&3, &4, &5), 2);
assert_eq!(add_mod(&2, &5, &6), 1);
assert_eq!(add_mod(&-3, &-2, &4), -1);
assert_eq!(add_mod(&2, &3, &5), 0);