IntModInv
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:2147:
bool ok = false;
ok = IntModInv(&inverse, b, modulus);
if (!ok) {
IntDeinit(&inverse);- In
Int.c:2298:
}
bool IntModInv(Int *result, const Int *value, const Int *modulus) {
ValidateInt(result);
ValidateInt(value);- In
Int.Math.c:807:
bool test_int_mod_inv(void) {
WriteFmt("Testing IntModInv\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Int.Math.c:816:
Int check = IntInit(&alloc.base);
bool result = IntModInv(&result_value, &value, &mod);
result = result && (IntToU64(&result_value) == 4);- In
Int.Math.c:910:
bool test_int_mod_inv_no_solution(void) {
WriteFmt("Testing IntModInv no-solution case\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Int.Math.c:918:
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntModInv(&result_value, &value, &mod);
result = result && (IntToU64(&result_value) == 99);
Last updated on