You must be wondering, why is this a so important subject? Well, take the example where a challenge asks you to take a "natural number" as input. What's a natural number? A non-negative integer, or a positive integer? The same would happen with Fibonacci numbers, do we include the 0 or not?
Another example would be for a challenge asking you to handle a case where you have to do 0⁰. Does that equal 1 or 0?
In both cases, and generally in a case where a mathematical concept has many accepted definitions and the question doesn't specify which one to use, one would either
- wonder what definition to follow, or
- perceive it as "too obvious" and use the definition they see themselves fit.
In the first case, one can simply leave a comment asking the original poster what definition to use. In the second case, they will use a particular definition to make an answer, and then there are many possibilities, so that the definition used can be:
- free for the answerer to choose,
- the one the original poster intended, or
- different from the intended definition.
I emphasize on the last case, since there can be the one answer with the wrong definition, or a swarm of answers with wrong definitions, the latter being more difficult to face, so more of a problem.
To avoid such cases of ambiguity, what should be done about it?
1
in the primes \$\endgroup\$0^0=1
and 1 is not prime \$\endgroup\$0^0
is as undefined as0/0
. \$\endgroup\$∞
, hadn't been defined as undefined... \$\endgroup\$0/0
=∞
,0/-0
=-∞
, so it's undefined \$\endgroup\$0/0
: you seef(x)/g(x)
wherelim x->a: f(x) = g(x) = 0
, and then you evaluatef(a)/g(a)
using l'Hôpital's rule; similarly you never see0^0
butf(x)^g(x)
. Ask a combinatorialist what0^0
evaluates to and they'll say1
because in any combinatorial context in which it occurs that is the appropriate limit. \$\endgroup\$