mirror of
https://github.com/danog/PrimeModule-ext.git
synced 2024-11-30 04:19:18 +01:00
_config.yml | ||
.gitignore | ||
example.php | ||
LICENSE | ||
main.cpp | ||
Makefile | ||
primemodule.ini | ||
README.md |
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: