diff --git a/src/numtheory/fp_isprime_ex.c b/src/numtheory/fp_isprime_ex.c index 2b61f8c..c318cac 100644 --- a/src/numtheory/fp_isprime_ex.c +++ b/src/numtheory/fp_isprime_ex.c @@ -53,6 +53,10 @@ int fp_isprime_ex(fp_int *a, int t) /* do trial division */ for (r = 0; r < 256; r++) { + if (fp_cmp_d(a,primes[r])== FP_EQ) { + printf("a is in the table\n"); + return FP_YES; + } fp_mod_d(a, primes[r], &d); if (d == 0) { return FP_NO;