On Thu, 5 Dec 2024 at 12:51, Paul Mansfield <
pa...@mansfield.co.uk> wrote:
>
> thanks. I should add I am not a mathematician so apologies if I am vague
>
> my concern is that if the number I am testing has too many digits, then using one of libraries like primePy.isaprime or sympy will break and give errors or the wrong answers, hence wondering if mpmath has a ready made solution I can cargo-cult.
What is it that makes you think that something would break if you have
too many digits? Why would you expect that copying some code from
mpmath instead would solve that problem?
> OTOH, I am not going to be dealing with truly huge prime numbers for now, so maybe I should simply use a lookup table giving me all primes up to a few hundred digits?
That lookup table would be very large (too large to fit into computer memory).
--
Oscar