10 ms·
Not a calculator engineer but this seems hideously complex?
by jwmoz 2y ago
Not a calculator engineer but this seems hideously complex?
- tim-kt 2y agoFor an everyday use calculator? Sure. It's still fun and challenging to create a calculator that can handle "as much" math/arithmetics as possible.
- grandempire 2y agoIt’s really not just for experts though. Even dealing with fractions is going to require more than a naive implementation.
- dgacmu 2y agoMaybe, though in the paper (not the article): > We no longer receive bug reports about inaccurate results, as we occasionally did for the 2014 floating-point-based calculator (with a footnote: This excludes reports from one or two bugs that have now been fixed for many months. Unfortunately, we continue to receive complaints about incorrect results, mostly for two reasons. Users often do not understand the difference between degrees and radians. Second, there is no standard way to parse calculator expressions. 1 + 10% is 0.11. 10% is 0.1. What’s 10% + 10%?) When you have 3 billion users, I can imagine that getting rid of bugs that only affect 0.001% of your userbase is still worthwhile and probably pays for itself in reduced support costs.
- Aardwolf 2y ago> 1 + 10% is 0.11. I know adding % has multiple conventions, but this one seems odd, I'd interpret 1 + 10% as "one plus 10 percent of one" which is 1.1, or as 1 + 10 / 100 which happens to be also 1.1 here The only interpretation that'd make it 0.11 is if it represents 1% + 10%, but then the question of 10% + 10% is answered: 0.2 or 20%. Or maybe there's a typo and it was supposed to say "0.1 + 10%"
- BoiledCabbage 2y ago1 + 10% could parse like the following: (1+10)% Which is 11% or 0.11
- jtbayly 2y agoI’m confused. Why would 1 + 10% obviously be 0.11? I expected 1.1 (which is what my iOS calculator reported, when I got curious). I do understand the question of parsing. I just struggle to understand why the first one is confidently stated to correctly result in a particular answer. It feels like a perfect example itself of a problem with unclear parsing.
- athrowaway3z 2y agoI think a big issue with how we teach math, is the casualness with which we introduce children to floating points. Its like: Hey little Bobby, now that you can count here are the ints and multiplication/division. For the rest of your life there will be things to learn about them and their algebra. Tomorrow we'll learn how to put a ".25" behind it. Nothing serious. Just adds multiple different types of infinities with profound impact on exactness and computability, which you have yet to learn about. But it lets you write 1/4 without a fraction which means its simple!
- layer8 2y agoThere is no floating point here.
- criddell 2y ago> For the rest of your life there will be things to learn about them and their algebra. That’s just not true for the vast majority of people.
- itishappy 2y agoTotally agree. It bothered me when I was younger, though I had no idea how to explain why, but this should be deeply unsettling to everyone who encounters it: 1/4 = 0.25 exact 1/3 = 0.333... infinitely repeating approximation
- grandempire 2y ago
- grandempire 2y agoReal numbers are quite complex (no pun). Understanding the material well is a junior level math major course. If you really understand the existing math curriculum this should be high school level.