3 ms·
Toward an API for the Real Numbers
- PaulHoule 6y agoI think it's a lot simpler than that. People get in trouble because you can't say 1/10 in IEEE floating point, any more than you can say 1/3 in decimal floating point with a finite number of digits. Back in the day IBM realized people would cut checks for the wrong amount if you used binary floating point so they put decimal floating point in COBOL. Everybody else cuts checks for the wrong amount. When you try to teach the "non-professional programmer" to (say) make a digital twin of their workgroup with contemporary languages such as Python one of the many things that make them give up in despair is 0.1 + 0.2 == 0.3 is false. It was said that Viscalc used decimal FP because of the fear of this but the market didn't care. Conventional wisdom is that ordinary people aren't fazed by this but personally I think this is one of about ten ways that "computers don't compute" that are like Phillip Zimbardo's broken window or Vaughn's "normalization of deviance" that make people think "computers are for geeks". If you believe there is some limit of what people can hold in their head at once and that people aren't going to function at that limit when they're learning, it is a real problem. You need to understand your problem, the essentials of programming, the details of your programming language, and the broken number system that was passed down by an unresponsive and out-of-touch "elite".