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 )
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!
Reminds me of another ...
float sin(float x) { return x; }
is remarkably accurate for a large proportion of the possible input values.
similarly 7 9s chance of undefined behavior in C++ integer multiplication due to overflow. so probable with random Input that optimizing away imul operations would be done by an AI-based optimizer