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/2000-November/010389.html below:

[Python-Dev] Revamping Python's Numeric Model

[Python-Dev] Revamping Python's Numeric Model [Python-Dev] Revamping Python's Numeric ModelMartin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat, 4 Nov 2000 22:15:13 +0100
> Yes. 1.0 is not an exact number. What's wrong with that?
> (Consider stuff like 0.333333333*3: this shouldn't be exact!)

It's not inherently wrong. It just points out an omission in the PEP:
it doesn't talk about the meaning of number literals. Since the new
model is going to follow algebraic principles more closely, I had
expected that

  0.333333333 == 333333333 / 1000000000

where, as I understand the proposal, the right-hand side is an exact
number (so 0.333333333*3 would be 999999999 / 1000000000).

One of the more-frequent questions on python-help is confusion about
floating-point numbers, e.g. why is the result of 1.99+4.99 printed
as 6.9800000000000004; users often report that as a bug.

Of course, spelling the number you had in mind as inexact(0.333333333)
is hardly acceptable, either.

Regards,
Martin



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