[me] > > You know where I'm leaning... I don't know that newbies are genuinely > > hurt by FP. If we do it right, the naive ones will try 11.0/10.0, see > > that it prints 1.1, and be happy; the persistent ones will try > > 1.1**2-1.21, ask for an explanation, and get a introduction to > > floating point. This *doesnt'* have to explain all the details, just > > the two facts that you can lose precision and that 1.1 isn't > > representable exactly in binary. Only the latter should be new to > > them. [Paul] > David Ascher suggested during the talk that comparisons of floats could > raise a warning unless you turned that warning off (which only > knowledgable people would do). I think that would go a long way to > helping them find and deal with serious floating point inaccuracies in > their code. You mean only for == and !=, right? This could easily be implemented now that we have rich comparisons. We should wait until 2.2 though -- we haven't clearly decided that this is the way we want to go. --Guido van Rossum (home page: http://www.python.org/~guido/)
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