On 2018-07-13 14:26, Steven D'Aprano wrote:
I'm pretty sure that Sage is using numpy
This computation uses PARI/GP, a dedicated library for number theory (https://pari.math.u-bordeaux.fr/) with a Python interface (https://github.com/defeo/cypari2).
And it's probably making far less conservative choices about the rate of false positives it is willing to accept.
It's an actual primality test, not a probable primality test. But for numbers which are not prime (like your examples), the difference doesn't actually matter.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/