aleaxit / gmpy

General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
https://gmpy2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
510 stars 86 forks source link

Is the `is_strong_bpsw_prp` code correct? #423

Closed haru-44 closed 1 year ago

haru-44 commented 1 year ago

The is_strong_bpsw_prp is described as follows

https://github.com/aleaxit/gmpy/blob/016dc985202f2186bf924e80eacdfb14ece17b38/src/gmpy_mpz_prp.c#L1518-L1521

On the other hand, it calls GMPY_mpz_is_selfridge_prp as follows

https://github.com/aleaxit/gmpy/blob/016dc985202f2186bf924e80eacdfb14ece17b38/src/gmpy_mpz_prp.c#L1577

I think I should call GMPY_mpz_is_strongselfridge_prp, am I mistaken?

casevh commented 1 year ago

You are correct. A fix has been committed. I will be release version 2.2.0a1 as soon as I can.

haru-44 commented 1 year ago

Thank you