#include "arith_utils.h" #include "prime_gen.h" #include #include static long * adjust_coeffs_to_mod(int degree, long * coeffs, long mod); static long * solve_prime_power_congruence(int degree, long coeffs[], long prime, int power); static long * solve_system_of_order_1_congruence_sets(int numOfSets, int * lengthsOfSets, long ** sets, long mods[]); long chinese_remainder_solution(int numberOfEquations, long scals[], long mods[]){ int i; long long x = 0; long m = mods[0]; long modCoeff; for(i=1; i