3 ms·
At the risk of coming across as being a spoilsport, I think when someone says "anyone can write a calculator app", they just mean an app that simulates a pocket
by gweinberg 2y ago
At the risk of coming across as being a spoilsport, I think when someone says "anyone can write a calculator app", they just mean an app that simulates a pocket calculator (which is indeed pretty easy) as opposed to one which always gives precisely the right answer (which is indeed impossible). Also, you can avoid the most embarrassing errors just by rearranging the terms to do cancellation where possible, e.g. sqrt(2) * 3 * sqrt(2) is absolutely precisely 6, not 6 within some degree of approximation.
- grandempire 2y agoPocket calculators are not using 32 bit floating point math.
- zinekeller 2y agoIn fact, even cheap no-name calculators are using BCD (binary-coded decimal) instead of "normal" representation of numbers.
- lmm 2y ago> as opposed to one which always gives precisely the right answer (which is indeed impossible) Per the article, it's completely possible. Frankly I'd say they found the obvious solution, the one that any decent programmer would find for that problem.
- macintux 2y ago> Frankly I'd say they found the obvious solution, the one that any decent programmer would find for that problem. That statement seems to belittle the amount of effort and thought described in the article. And wildly contradicts my experience.