PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gmp_random> <gmp_powm
Last updated: Fri, 18 Jul 2008

view this page in

gmp_prob_prime

(PHP 4 >= 4.0.4, PHP 5)

gmp_prob_prime — Controlla se il numero è "probabilmente primo"

Descrizione

int gmp_prob_prime ( resource $a [, int $reps ] )

Se questa funzione da come risultato 0, a non è primo. Se sarà 1, allora a è "probabilmente" primo. Invece se il risultato è 2, allora a sarà sicuramente primo. I valori "attendibili" di reps possono variare da 5 a 10 (di default 10); un valore più alto fa diminuire la probabilità che un numero non primo passi come "probabile" primo.

La funzione usa il test probabilistico di Miller-Rabin.



add a note add a note User Contributed Notes
gmp_prob_prime
There are no user contributed notes for this page.

gmp_random> <gmp_powm
Last updated: Fri, 18 Jul 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites