nextPrime(_:)

The next probable prime greater than self

BigInt.swift:1819
func nextPrime(_ p: Int = 30) -> BInt

Parameters

p

The returned number is prime with probability > 1 - 1/2^p, default value is 30

Returns

The smallest probable prime greater than self, returns 2 if self is negative