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/2011-April/111099.html below:

[Python-Dev] Not-a-Number

[Python-Dev] Not-a-Number [Python-Dev] Not-a-NumberSteven D'Aprano steve at pearwood.info
Fri Apr 29 03:44:10 CEST 2011
Greg Ewing wrote:
> Taking a step back from all this, why does Python allow
> NaNs to arise from computations *at all*?

The real question should be, why does Python treat all NANs as 
signalling NANs instead of quiet NANs? I don't believe this helps anyone.

> +Inf and -Inf are arguably useful elements of the algebra,
> yet Python insists on raising an exception for 1.0./0.0
> instead of returning an infinity.

I would argue that Python is wrong to do so.

As I've mentioned a couple of times now, 20 years ago Apple felt that 
NANs and INFs weren't too complicated for non-programmers using 
Hypercard. There's no sign that Apple were wrong to expose NANs and INFs 
to users, no flood of Hypercard users confused by NAN inequality.



-- 
Steven
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