On Thu, 25 Mar 2010 11:36:28 pm Jesus Cea wrote:
> Infinites are "not equal" for a good reason, for example.
>
> 1/0 and 2/0 are both infinites, but one is "greater" than the other.
> Or (1/0)^(1/0), an infinite infinitelly "bigger".
I think you're mistaken. In Python 3.1:
>>> x = float('inf')
>>> y = float('inf') + 1
>>> x == y
True
>>> x is y
False
In cardinal arithmetic, there are an infinity of different sized
infinities, but in ordinal arithmetic there are only two: +inf
and -inf, corresponding to the infinities on the real number line. (I
hope that I'm not over-simplifying -- it's been more than a decade
since I've needed to care about this.)
But in any case, the IEEE standard doesn't deal with cardinals: it only
uses two signed infinities.
--
Steven D'Aprano
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com