โˆž and NaN

Maybe Brian should move the math stuff to a new topic and then close this one.

No. Is 1/2 the same as 1 x 0/2? Or the same as 1 x 2/2? So where do you get that 1/0 should be the same as 1 x 0/0?


When we say that something is infinite, we mean that it's larger than any finite value. It can be useful in debugging your ideas to ask "what it if were a million, what would happen?" But that can't be actually true; it's just an interesting counterfactual to think about. So, for example, 1/0 is infinite because if it were any finite value v, however large, then vยท0=1, but any finite value times 0 is 0.

So, speaking precisely, you can't say (some expression) is infinity. You can just say "As (some variable) gets larger and larger, so does (the expression)." Instead of "gets larger and larger" you can write "โžžโˆž" and say "tends toward infinity" but you're supposed to know that that doesn't imply that there's an actual value โˆž. On the other hand, if the expression is 1/x, you can say that as xโžžโˆž, 1/xโžž0. And 0 is an actual value.

0/0 is a different case. If x=0/0, then 0ยทx=0. But this is true for any value of x. So 0/0 isn't infinite; it's undefined. Could be anything. In floating point arithmetic this is denoted by "NaN," which stands for "not a number." This is a floating point value distinct from โˆž, which is also a floating point value. That doesn't mean NaN and โˆž are mathematical numbers, just that it's sometimes useful pragmatically to do computations in which they occur as intermediate results.

Note that you can't say, as a general rule, that, e.g., 2โˆž/โˆž=2. Actually 2โˆž/โˆž=NaN, because we don't know anything about the expressions that gave rise to those two infinities. Maybe if you divided the actual expressions, if, e.g., the top โˆž comes from xยฒ and the bottom โˆž comes from xยฒ, then the whole expression is a constant 2 and so in that case you might say 2xยฒ/xยฒ โžž 2 as xโžžโˆž. But if the top โˆž is xยฒ and the bottom โˆž is x, 2xยฒ/x=2x, which โžžโˆž as xโžžโˆž.

0^0 is a different story entirely. There are exactly two possible values that make sense for this. โˆ€xโ‰ 0, 0^x=0. But โˆ€xโ‰ 0, x^0=1. So we're stuck with the unfortunate result that either 0^x or x^0 is going to have a discontinuity at x=0. There's no "right" or "wrong" choice, but mathematicians have decided to define 0^0 as 1, because that turns out to be useful in more situations. Nothing to do with โˆž (or NaN) in this case.

None of this is weird or paradoxical or (if we're careful to talk about limits) incorrect.