On Sunday, 30 March 2014 at 23:40:14 UTC, bearophile wrote:
I think we should be careful about adding an isPrime method, I think adding an isProbablePrime plus the prime sieve should cover most use cases.

This is an interesting opinion. Can you explain why an isPrime is less useful than a isProbablePrime (like this: http://en.wikipedia.org/wiki/Miller-Rabin_primality_test ) plus a sieve? Can't you have both a isPrime and a isProbablePrime in Phobos?

Bye,
bearophile

You can have both, it's not less useful.
I just wonder if there are real-world use-cases worth supporting in Phobos where you want need a one-off primality test where a definite answer is require.
I.E. Are there non-toy uses to support inclusion?

Reply via email to