A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-April/044120.html below:

[Python-Dev] Expert floats

[Python-Dev] Expert floats [Python-Dev] Expert floatsKa-Ping Yee python-dev at zesty.ca
Tue Apr 6 09:49:05 EDT 2004
On Tue, 6 Apr 2004, Simon Percivall wrote:
> So how should "2.2 - 1.2 - 1" be represented?
>
> Matlab (Solaris 9):          2.22044604925031e-16
> Octave (MacOS X 10.3):       2.22044604925031e-16
> Python 2.3.3 (MacOS X 10.3): 2.2204460492503131e-16
>
> Is this something you accept since Matlab does it?

I accept it, but not primarily because Matlab does it.

It is fine to show a value different from zero in this case
because the result really is different from zero.  In this case
those digits are necessary to represent the machine number.
In other cases (such as 1.1) they are not.


-- ?!ng

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