GMP function to generate prime number bigger than X
Hans Petter Selasky
hps at selasky.org
Wed Jan 26 13:35:00 CET 2022
Hi,
I didn't find any functions to quickly generate a prime number bigger
than X in GMP, so I made my own for now.
I have a special SAT solving application, which need arbitrarily sized
prime number, from 8-bits to several thousand bits and even more.
The algorithm is inside hprsat_set_global_modulus() at:
https://github.com/hselasky/libhpsat/blob/main/hpRsat_prime.cpp
It basically consists of generating smaller prime numbers to quickly
build up a bigger one.
--HPS
More information about the gmp-discuss
mailing list