Search Results
Parameters ¶ num The number being checked as a prime. A GMP object, an int, or a string that can be interpreted as a number following the same logic as if the string was used in gmp_init () with automatic base detection (i.e. when base is equal to 0). repetitions Reasonable values of repetitions vary from 5 to 10 (default being 10); a higher value lowers the probability for a non-prime to ...
Jul 11, 2025 · The gmp_prob_prime () is a built-in function in PHP which is used to check how much is the possibility of given GMP number (GNU Multiple Precision : For large numbers) to be prime or not.
Return Values PHP gmp_prob_prime () function a integer value, 0 means not a prime, 1 means probably prime and 2 means exact prime number.
Un objet GMP, un entier, ou une chaîne de caractères numérique. repetitions repetitions peut raisonnablement varier de 5 à 10 (par défaut, c'est 10); une valeur supérieure réduit la probabilité qu'un nombre non premier soit identifié comme "probablement" premier. Un objet GMP, un entier, ou une chaîne de caractères numérique.
If this function returns 0, a is definitely not prime. If it returns 1, then a is "probably" prime. If it returns 2, then a is surely prime. Reasonable values of reps vary from 5 to 10 (default being 10); a higher value lowers the probability for a non-prime to pass as a "probable" prime.
Parameters a The number being checked as a prime. It can be either a GMP number resource, or a numeric string given that it is possible to convert the latter to a number. reps Reasonable values of reps vary from 5 to 10 (default being 10); a higher value lowers the probability for a non-prime to pass as a "probable" prime. It can be either a GMP number resource, or a numeric string given that ...
Description int gmp_prob_prime ( resource a [, int reps] ) If this function returns 0, a is definitely not prime. If it returns 1, then a is "probably" prime. If it returns 2, then a is surely prime. Reasonable values of reps vary from 5 to 10 (default being 10); a higher value lowers the probability for a non-prime to pass as a "probable" prime.
