PS: they seem to _know_ that endless*endless > endless but do not dare to admit it
PS: they seem to _know_ that endless*endless > endless but do not dare to admit it
x * x === x^2
The parent comment was alluding to the idea of set cardinality (https://en.wikipedia.org/wiki/Cardinality). Two sets have the same cardinality if you can establish a bijection (a one-to-one mapping) between elements of one set and elements of the other. The set of all natural numbers is said to have a "countably infinite" cardinality.
It turns out that for any countably infinite set S, the set S x S is also countably infinite (see Hilbert's hotel: https://en.wikipedia.org/wiki/Hilbert%27s_paradox_of_the_Gra...). For example, the set of 2-tuples of natural numbers (1, 1), (1, 2), (1, 3), ..., (2, 1), (2, 2), ... is the same size as the set of natural numbers. So in this sense, "endless*endless = endless". Whereas the set of infinitely-long tuples of natural numbers is "uncountably infinite;" it has a cardinality greater than that of the set of natural numbers. Thus, "you have to go exponential"; i.e. "endless^endless".
> Infinity + Infinity
Infinity
> Infinity - Infinity
NaN
> Infinity == Infinity
true
> NaN == NaN
false
The fun thing: NaN to the power of zero (because technically the type of NaN is a ... number) > NaN ** 0
1
> typeof(NaN)
'number'
By the same logic, NaN is also even because > NaN + NaN
NaN
but i think it's better not explain that to your six year old... > 1/0
Infinity
But python throws a divide by zero error: >>> 1/0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: division by zero
Still you do have infinity and nan in python - because these are part of the floating point spec. >>> float('inf') - float('inf')
nan
>>> float('inf') == float('inf')
True
>>> NAN=float('inf') - float('inf')
>>> NAN == NAN
False
However that's not mathematics, it's computers (these are even stranger...)I have my own little programming language - PYX [1] - and i don't allow this madness (even if it is a violation of the floating point spec ;-)
pyx
> mathconst.Infinity - mathconst.Infinity
Error: results in 'not a number' - that's not allowed here
#(1) mathconst.Infinity - mathconst.Infinity
|....................^
> 1/0
Error: Can't divide by zero
#(1) 1/0
|..^
[1] PYX - https://github.com/MoserMichael/jscriptparse - it's supposed to be an educational programming language, where I am trying to have detailed error messages, my side project. >>> type(1.0)
<class 'float'>
>>> 1.0/0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: float division by zero
However numpy lets you do it - it is only a warning >>> import numpy as np
>>>
>>> np.divide(1.0,0)
__main__:1: RuntimeWarning: divide by zero encountered in true_divide
inf>>> 1/0.0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: float division by zero>>> 1.0/0.0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: float division by zeroIt's been a while since I was doing this in a classroom, but I feel like those things you're thinking are nonuniform infinities could just as well be thought of as entities comprised of infinity and a (perhaps implied) coefficient. Divide out infinity to reveal the coefficient. (And the same for powers/logs, etc.)
In this model, infinities are indeed uniform (quite similar to a constant), though they are often augmented in any of infinitely many ways.
> NaN == NaN
false
Reminds me of SQL, where NULL isn't equal to NULL.A circle is endless, and yet certainly isn't infinite.