Thank you for the explanation. I have nothing more to add to this discussion

On Sun, Oct 18, 2020, 4:47 AM Steven D'Aprano <steve@pearwood.info> wrote:
On Sun, Oct 18, 2020 at 03:26:11AM -0400, Wes Turner wrote:

> assert math.inf**0 == 1
> assert math.inf**math.inf == math.inf

Wes, I don't understand what point you are trying to make here. Are you
agreeing with that behaviour? Disagreeing? Thought it was so surprising
that you can't imagine why it happens? Something else?

If you find a behaviour which is forbidden or contradicted by the
documentation, then you should report it as a bug, but just
demonstrating what the behaviour is with no context isn't helpful.

Please remember that the things which are blindingly obvious to you
because you just thought them are not necessarily obvious to those of us
who aren't inside your head :-)

Python's float INFs and NANs (mostly?) obey the rules of IEEE-754
arithmetic. Those rules are close to the rules for the extended Real
number line, with a point at both positive and negative infinity.

These rules are not necessarily the same as the rules for transfinite
arithmetic, or the projective number line with a single infinity, or
arithmetic on cardinal numbers, or surreal numbers.

Each of these number systems have related, but slightly different,
rules. For example, IEEE-754 has a single signed infinity and 2**INF is
exactly equal to INF. But in transfinite arithmetic, 2**INF is strictly
greater than INF (for every infinity):

    2**aleph_0 < aleph_1
    2**aleph_1 < aleph_2
    2**aleph_2 < aleph_3

and so on, with no limit. There is no greatest aleph, there is always a
larger one.

Do you have a concrete suggestion you would like to make for a change or
new feature for Python? If not, I suggest that this thread is going
nowhere.


--
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/U5WXW3WTNRNWV5PEADF6CDZC6FFBBUJG/
Code of Conduct: http://python.org/psf/codeofconduct/