This package contains an example program that uses Java's java.math.BigInteger from Swift to determine whether a given number is probably prime. You can try it out with your own very big number:
swift run JavaProbablyPrime <very big number>
The package itself demonstrates how to:
- Use the Java2Swift build tool plugin to wrap the
java.math.BigIntegertype in Swift. - Create an instance of
BigIntegerin Swift and use itsisProbablyPrime.