123 assert(math::modular_inverse_fermat::modular_inverse(0, 97) == -1);
124 assert(math::modular_inverse_fermat::modular_inverse(15, -2) == -1);
125 assert(math::modular_inverse_fermat::modular_inverse(3, 10) == -1);
126 assert(math::modular_inverse_fermat::modular_inverse(3, 7) == 5);
127 assert(math::modular_inverse_fermat::modular_inverse(1, 101) == 1);
128 assert(math::modular_inverse_fermat::modular_inverse(-1337, 285179) == 165519);
129 assert(math::modular_inverse_fermat::modular_inverse(123456789, 998244353) == 25170271);
130 assert(math::modular_inverse_fermat::modular_inverse(-9876543210, 1000000007) == 784794281);