Go to file
Daniil Gentili 6995cc94d6 Create CNAME
2017-08-16 16:00:51 +02:00
_config.yml Set theme jekyll-theme-cayman 2017-08-16 15:57:31 +02:00
.gitignore First commit 2017-05-06 18:32:27 +01:00
CNAME Create CNAME 2017-08-16 16:00:51 +02:00
example.php Return only one factor 2017-05-06 19:28:08 +01:00
LICENSE First commit 2017-05-06 18:32:27 +01:00
main.cpp Return only one factor 2017-05-06 19:28:08 +01:00
Makefile Makefile fixes 2017-07-23 17:52:04 +02:00
primemodule.ini First commit 2017-05-06 18:32:27 +01:00
README.md Update README.md 2017-08-16 15:59:29 +02:00

PrimeModule-ext

PHP extension for factorizing huge (up to 2^63-1) numbers (optimized for huge semiprimes).

To compile it, simply install https://github.com/CopernicaMarketingSoftware/PHP-CPP and run make && sudo make install in this directory.

git clone https://github.com/CopernicaMarketingSoftware/PHP-CPP
cd PHP-CPP
make -j$(nproc)
sudo make install
cd ..
git clone https://github.com/danog/PrimeModule-ext
cd PrimeModule-ext
make -j$(nproc)
sudo make install


API:

integer factorize( mixed $pq )


Parameters:

pq - The number to factorize, a string or an integer.


Return value: an integer, containing one of the factors of the number.


Example: