New code for primality testing

Marco Bodrato bodrato at
Sun Jan 6 12:06:27 UTC 2019


Il Dom, 6 Gennaio 2019 10:16 am, Niels Möller ha scritto:
> Speaking or prime sieving, would it make sense to provide some command
> line tool with gmp, to generate a list of primes? I have such a tool in

A command-line tool?

> but it doesn't really belong there so I'm considering deleting it.

Seven years ago you proposed an interface
and three years ago I wrote an possible implementation of that interface

I mean, if we decide that a couple of functions (one to count primes,
another to loop on primes) *strictly* in the range of unsigned long
integers, belong the the GMP library, then we have all the building blocks
and we can write them.

Both functions should have the prefix gmp_ as they would belong to neither
mpn_ nor mpz_ ... Or should we support an interface for intervals in the
mpz range? With the _ui functions only used for special cases?

Once we will have the functions, the command-line tool can be a demo of them.



More information about the gmp-devel mailing list