3 ms·
Ask HN: Why are calculator apps better than spotlight/Python?
Even someone who knows nothing about programming can do arithmetic in spotlight.
- PaulHoule 4y ago0.1 + 0.2 - 0.3 = 0 on my HP Prime calculator, in Python 0.1 + 0.2 - 0.3 = 5.551115123125783e-17 It's like talking to the wind but I think small problems like this cause people to decide programming is not for them.
- _the_inflator 4y agoOne can argue, that the second line is the very reason you get into the depth of Computer Science and zeros and ones. This can be challenging and non-trivial.
- PaulHoule 4y agoExactly. Accountants, Engineers and many other experts are familiar with numbers. It's a specialization of its own to be aware that floating point numbers are always fractions that have a power of 2 on the bottom and to know how to deal with it. Other experts are driven nuts by it because they have a number of invariants in their head that are violated. Show an accountant some numbers that "don't add up" and they'll tell you to come back when you have them in order.
- amichail 4y agoSpotlight gives 0.