PHP gmp_prob_prime() functionThe PHP gmp_prob_prime() function checks the probability of the given input GMP number to being prime. This function determines if the given GMP number is a prime or not. This function is used for large and complicated numerical values. SyntaxThe given syntax shows the GMP function for identifying the probability of the prime number. Parameters
Return Value
ExamplesThe given examples show the probability of the prime number of the various GMP parameters. Example1: The given example finds the probability of prime number of the given positive input value. Output: The following output identifies the probability of the prime number of the given value. Example2: The given example identifies probability of prime number of the negative input value. Output: The following output identifies the probability of the prime number of the given value. Example3: Output: The following output identifies the probability of the prime number of the given value. Example4: The given example identifies probability of prime number of the given GMP string value. Output: The following output identifies the probability of the prime number of the given value. Example5: The given example shows probability of prime number of the given GMP binary value. Output: The following output identifies the probability of the prime number of the given value. ConclusionThe gmp_prob_prime() function shows whether the given number is prime or not with a probability of the prime number. It works on lengthy and complicated mathematical operations. Next TopicPHP gmp_random_bits() function |