Skip to content

Instantly share code, notes, and snippets.

View devcarmelo's full-sized avatar

Carmelo Marín Abrego devcarmelo

View GitHub Profile
@devcarmelo
devcarmelo / pollard_rho.php
Created June 29, 2018 15:47
Implementación del algoritmo de Pollard Rho en PHP usando la librería GMP
<?php
function gmp_pollard_rho($number) {
$one = gmp_init(1);
$two = gmp_init(2);
$n = $number instanceof GMP ? $number : gmp_init($number);
if(gmp_mod($n, $two) == 0) {