I’ve been thinking about this for days.
-
The problem is its inaccuracy for smaller input sets involving low-digit-count numbers.
Trivially fixed by hardcoding the results for 3-digit and lower input. Ship it!
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye Algorithms like this are used as a pre-prime testing before you do the actual prime testing that requires CPU heavy computation.
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye
@jonathankoren
It is one of the best one-class classifier I've ever seen. Extremely efficient and the computational time doesn't grow the larger the input gets. -
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @Nephele @jonathankoren
That's prime crime -
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @silicatefondue @jonathankoren this class of algorithm is called the stopped clock algorithm. It joins the previously identified Monte Carlo and las Vegas algorithms.
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @jonathankoren If you change that to:
return !(x&1);
You have improved the probability quite a lot and still fast and won't get optimized away. -
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @jonathankoren amazing, we've discovered prime numbers past 2 -
@jonathankoren Is there a use case for Bogosort?
-
@mhoye @jonathankoren amazing, we've discovered prime numbers past 2
@mjdxp @jonathankoren This changes everything!
-
@mhoye @jonathankoren It might be sentient
@finestructure @jonathankoren oh shit you’re right
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @jonathankoren can absolutely relate. Constantly trying convince my quantitative colleagues that discrete maths is different from their stochastic and AI based reasoning.
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @jonathankoren thats fantastic.
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
Reminds me of another ...
float sin(float x) { return x; }
is remarkably accurate for a large proportion of the possible input values.
-
I’ve been thinking about this for days. Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs. It really has so much going for it.
(Via @jonathankoren )
@mhoye @jonathankoren
And it’s O(1) too!
