Hi,
It is not related to exponentiation; it is due to the difference between
symbolic evaluation and real-valued evaluation when dividing by zero.
Real-valued arithmetic mirrors the IEEE floating point standard, I expect:
sage: 1.0/0
+infinity
While symbolic evaluation gives the divide-by-zero error:
sage: expr = 1.0/x
sage: expr(x=0)
<BOOM>
Traceback (most recent call last)
...
ValueError: power::eval(): division by zero
Note that the inline-function-notation "p(n) = ..." is really just
defining a symbolic expression. In the above snippet I rely on x being a
symbolic variable in a fresh Sage instance, thereby avoiding writing
"expr(x) = ...".
I don't have a better explanation for why this difference has been
adopted in Sage than the above: following IEEE standard vs doing the
mathematically safe-and-fail-early-solution. Perhaps someone more
knowledgeable about this can chime in.
Best,
Johan