No `isprime` function
Opened this issue · 5 comments
It is present in the primefac
module of the upstream package. In your package, it is in the _primefac
module. Since you changed the API, can you publish the documentation?
Sorry for late response.
First of all, I think isprime, nextprime, and more miscellaneous functions are not API of primefac. However, the original primefac is a library with only one file, so I, or you, don't know for "this function is private one". so I think your question is also correctly one.
This software is moved some "internal functions" to _primefac
module for maintainability, because the users are used another (e.g. gmpy2) library with this library as far as my observations but I still undocumented these modifications. I'm considering now for write the document for that in this year.
Hi. The documentation for “primefac” states, “As a module, we provide a primality test…”
I guess that I used isprime
from this module because I needed a deterministic primality test and it implements the Baillie-Pomerance-Selfridge-Wagstaff algoritm which is deterministic for numbers less than 2**64
.
ouch, I had overlooked that statement... Thanks for pointed out that. I'll re-read it soon (~ few weeks) and try to improve the API.
(I'll be working for this in this week ideally)