 These applications have led to significant study of algorithms for computing with prime numbers, and in particular of primality testing, methods for determining whether a given number is prime.The most basic primality testing routine, trial division, is too slow to be useful for large numbers.One group of modern primality tests is applicable to arbitrary numbers, while more efficient tests are available for numbers of special types.