c++ - Faster evaluation of modular polynomials -
a polynomial defined such of coefficients given less prime number p. wish evaluate polynomial @ point mod p. simple approach be;
int sum=arr[n],j=n-1;//sum polynomial value mod p @ point , arr[] coefficient array , k point @ polynomial evaluated while(j>=0) { sum = ((sum*k)%p + arr[j])%p; j--; }
but property exist regarding such polynomials such above approach optimized further (lesser time complexity)?
Comments
Post a Comment