4 ms·
>Does this mean that we have a sort of bloom filter-esque test for primality? This catches most non-primes ;) bool maybe_prime(x) { return x % 2 && x % 3 && x
by pubby 8y ago
>Does this mean that we have a sort of bloom filter-esque test for primality?
This catches most non-primes ;)
bool maybe_prime(x) { return x % 2 && x % 3 && x % 5 && x % 7; }
- std_throwaway 8y agoThis is both, correct, and useless.
- comboy 8y agoCorpos would love it.
- jdmichal 8y agoAnd it's infinitely expandable to improve accuracy, at a linear cost of computation!