HaskellProjects

primes

A high-precision prime number generator implemented in Haskell using the GMP (GNU Multiple Precision Arithmetic Library) for efficient prime computation.

This program finds and prints the next 10 prime numbers greater than a given integer.

⚙️ Build & Run

Make sure GCC, GHC, and GMP are installed. To build and execute:

cd primes
gcc -c cbits/wrappers.c -o cbits/wrappers.o
ghc -O2 primes.hs cbits/wrappers.o -o primes
./primes <n>

Example:

cd primes
ghc -O2 primes.hs -o primes
./primes 100

Output:

101
103
107
109
113
127
131
137
139
149

🧩 How It Works

🧠 Notes

🪪 Author

Abhrankan Chakrabarti