Indeterminate vs Undefined (vs Infinity)
Some people seem to have these things confused.
I feel like rambling about math so that’s what I’m doing. I’m referring to 0/0 and 1/0. One divided by zero is undefined, whereas zero divided by zero is indeterminate. What’s the difference? Undefined more or less means there is no number, whereas indeterminate means there can be any number.
For example, suppose we wish to find the value of 0/0, we set 0/0 = x, multiply both sides by 0 -> 0 = 0x -> true for everything, thus indeterminate.
As for undefined, suppose that 1/0 = x -> 1 = 0x -> no number will do this. It is common to think of 1/0 as infinity, but it’s not so simple. 1/0 is a number with infinite magnitude, but the direction is unknown. A look at the graph of y = 1/x will better help to explain this.
Depending on the direction that one approaches 1/0, determines the direction of the infinite number. 1/0 could be negative infinity, as can be seen by the graph. If one considers arriving at 1/0 in the complex plane, then 1/0 could be any complex infinity!
I prefer calling 1/0 undefined but some still call it infinity. The JavaScript language is one example that prefers “infinity” over “undefined” even though it has both an “undefined” value and an “Infinity” value (it also has a “NaN” or “Not a Number” value). The case for JavaScript is probably that it’s just easier to handle numbers but setting them to “Infinity” rather than set them to “undefined” because a division by zero would then set the variable to “undefined” and the programmer might be confused, thinking that “why is this variable unassigned?”