This project implements an algorithm to find the canonical expansion of a given number. It incorporates various factorization methods, including trial divisions, Pollard's Rho method, and others, to decompose numbers into their prime factors.
- C++ compiler (GCC or Clang)
- CMake (version 3.10 or higher)
- Make
- Docker (for building and running within a container)
- GMP (GNU Multiple Precision Arithmetic Library)
- Clone the repository and navigate to the project directory.
- Build the project using CMake and Make. Use the following commands:
cmake . && make -j12
- Run the executable with a number as an argument to find its canonical expansion. For example:
./canonicalExpansion 666
https://hub.docker.com/repository/docker/omega111111/factorization/general
- Ensure Docker is installed and running on your system.
- Build the Docker image from the Dockerfile provided in the project directory. Replace
your-image-name
with your preferred name for the Docker image:docker build -t your-image-name .
- Once the image is built, run it using Docker. The following command runs the container and executes the canonical expansion algorithm with a specified number (e.g., 666):
docker run your-image-name ./canonicalExpansion 666
Replace your-image-name
with the name you used when building the Docker image.
By following these steps, you can compile and run the canonical expansion algorithm both directly on your machine and within a Docker container.