Hacker News new | past | comments | ask | show | jobs | submit login

My 6 and 7 yo's call infinity the "endless number". Well, at least it is a NaN number :)

PS: they seem to _know_ that endless*endless > endless but do not dare to admit it




Well that fear is good because multiplication won't change the cardinality, you have to go exponential.


Not an expert but I thought it needed the 'power set' (set of all subsets) but maybe that's kinda the same as exponentiation in the end?


It is. The cardinality of the power set of a set S is 2^|S|.


You can see it as a binary "in or out" for each element of S.


That effectively does make it exponential

x * x === x^2


x^2 is not exponential; it's quadratic. 2^x is an example of an exponential function.

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".


by going exponential, they mean 2^x; x^2 can still be the same "size" as x


there is a difference between infinity and not a number, NaN isn't event equal to itself, in nodejs you get:

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


Huh. Most of those make sense to me, but infinity == infinity being true definitely feels like risky business. Algebraic limits is full of even some pretty trivial scenarios where infinity divided by a lesser-infinity turns out to be a real number— those cases where the two infinities are definitely not equal to each other.


Also: in javascript you can divide by zero

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


Dividing by 0 or -0 is a valid floating-point operation because there's an infinity in the number system, and JS uses double precision floating point for all numbers. Python has an integer type and a double type, and division by 0 is disallowed for integers, but okay for doubles.


your explanation makes sense, however python doesn't allow division of floating point number by 0 either:

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


Wow, Python really does hold your hand.

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


> those cases where the two infinities are definitely not equal to each other

It'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.


Infinite is just a fancy word for endless, anyway.


Not necessarily:)

A circle is endless, and yet certainly isn't infinite.


A circle is made up of an uncountably infinite set of points.


A line segment is also made up of an infinite set of points, but it's not endless.


I can just imagine someone coming up with the infinity symbol, and arguing (as we are here) about whether a circle represents the idea. No, not quite; it needs something more... another circle should suffice, and connect them seamlessly. Yes, yes. This looks much more infinite than a mere circle.


You can also map the all reals to the reals between 0 and 1, so the infiniteness of the extend isn't that crucial.


Infinite literally means ‘without end’. Finite means ‘something that finishes’. Infinite means ‘something that does not finish’.


Etymology is not the same thing as denotation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: