rikudou , 5 months ago While this doesn't work all the time, when it does, it's really fast. Similar to the isPrime function, it's correct most of the time and is much faster than alternative implementations: function isPrime(number) { return false; }
While this doesn't work all the time, when it does, it's really fast. Similar to the isPrime function, it's correct most of the time and is much faster than alternative implementations:
function isPrime(number) { return false; }
itslilith , 5 months ago asymptotically this is 100% correct!
asymptotically this is 100% correct!
mumblerfish , 5 months ago What would be the accuracy on something like a 64bit unsigned integer?
What would be the accuracy on something like a 64bit unsigned integer?
itslilith , 5 months ago WolframAlpha estimates PrimePi[2^64-1] to be about 4.15829E17, so about 97.7%
WolframAlpha estimates PrimePi[2^64-1] to be about 4.15829E17, so about 97.7%
Asudox , 5 months ago 50/50 chance of being right in O(1) time
50/50 chance of being right in O(1) time
rikudou , 5 months ago It's right much more often than just 50/50.
It's right much more often than just 50/50.
andnekon , 5 months ago 50/50 would be for isOdd with the same implementation
50/50 would be for isOdd with the same implementation
isOdd