3 ms·
I think the more important lesson here is to not write algorithms in a way that go into recursion because data types aren't infinitely precise.
by dingo_bat 10y ago
I think the more important lesson here is to not write algorithms in a way that go into recursion because data types aren't infinitely precise.
- thedufer 10y agoThe original didn't require infinite precision; rather, it required that the average of two different numbers be between the two or equal to the smaller one. This is true in integer arithmetic due to rounding down, but apparently not true for floating point.