I have the following code in my software:
boolean isPrime = false;
BigInteger testnumber = new BigInteger(unLikelyPrime.toPlainString());
if (testnumber.isProbablePrime(100))
{
isPrime = true;
}
Still with some composite numbers it tells me they are prime.
Examples:
32589158477649702043=181*12161*14805575143823
232862364358497360900063316886467769617=7*1777*26613151*99269775704082066217823753
198962376391690981640415251545285153602734402721821058212203976095419318882061= 271224769 × 683929111734272089584900601 × 1072582042095206356022742074568536678215669
What Java code could I use to get the accurate result, that these examples are composite.
Is there any other library I could use. Or has anybody written a primality test they could share?
Any help is appreciated.