> Binary fp loses in these common cases *just because* the true inputs can't > be represented, and the number printed at the end isn't even the true > result of approximately adding the approximated inputs. Decimal easily > avoids all of that. Well, some of it. It still doesn't avoid 1E50 + 1E-50 == 1E50, for example. > > Why are you not arguing against decimal floating-point if your goal > > is to expose users to the problems of floating-point as early as > > possible? > The overwhelmingly most common newbie binary fp traps today are failures > to realize that the numbers they type aren't the numbers they get, and > that the numbers they see aren't the results they got. Then how about giving a warning for every floating-point literal that cannot be exactly represented in binary?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4