A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/043831.html below:

[Python-Dev] Expert floats

[Python-Dev] Expert floats [Python-Dev] Expert floatsAndrew Koenig ark-mlist at att.net
Wed Mar 31 15:00:42 EST 2004
> 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?



More information about the Python-Dev mailing list

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