4 ms·
The hard part of writing a calculator app is not parsing `0.1` versus `.1`. That's trivial. The hard part of writing a calculator app is getting precise answers
by 5fOleL5Eo2So8qi 4y ago
The hard part of writing a calculator app is not parsing `0.1` versus `.1`. That's trivial. The hard part of writing a calculator app is getting precise answers instead of floating-point answers, and given that he thinks the hard part is parsing `.1`, it probably gets it wrong.
- kccqzy 4y agoSolved by https://www.hboehm.info/new_crcalc/CRCalc.html https://www.hboehm.info/new_crcalc/CRCalc.html Also, this is in the Android stock calculator so lifting the code over is easy. See also https://dl.acm.org/doi/10.1145/2911981 https://dl.acm.org/doi/10.1145/2911981
- outworlder 4y agoThat's a really large cognitive leap from such a small amount of data. Have you considered that they may not be using floating point numbers at all? They might be using arbitrary precision arithmetic. That was probably implemented by a library. So not as much effort as you would think.