Why does $b^n = b^{n-1} b$ require $n>0$ where $n$ is an integer? I'm reading The Art of Computer Programming, Volume 1 and it says that $b^n = b^{n-1} b$ if $n>0$
But I've always used it even when $n \le 0$ in my years of engineering math classes.  Whats going on?
 A: Oh, wait!  I get it.
This a programming book and they are trying to get you used to the idea of defining things recursively.
They are claiming it is the definition that if $b \ne 0$ and $n\in \mathbb Z$.
Then $b^n$ is defined as:
$$\begin{align}
\text{If $n = 0$ then } b^0 &:= 1 \\
\text{If $n > 0$ then } b^n &:= b^{n-1}\cdot b \\
\text{If $n < 0$ then } b^n &:= \frac {b^{n+1}}b \\
\end{align}$$
So to figure out what $2^5$ is you figure out what $2^4$ is and then multiply that by $2$.  To figure out what $2^4$ is you figure out what $2^3$ is and then multiply that be $2$.  And so on.  Eventually you will figure that $2^0=1$ so $2^1 = 2\cdot1=2$ and $2^2 = 2\cdot2^1 = 2\cdot2=4$ and $2^3 = 2\cdot2^2 = 2\cdot4=8$ and so on....
It is a true fact that $b^n= b^{n-1}b$ for whatever value $n$ is. But if I use that to calculate $3^{-2}$ I will get an infinite loop.  $$3^{-2} = 3^{-3}\cdot3 = 3^{-4}\cdot3\cdot3 = 3^{-5}\cdot3\cdot3\cdot3 = \cdots$$ are all true, but I will never get a resolution.
So, $$b^n = b^{n-1}\cdot b = \frac {b^{n+1}}b$$ is a true statement, always. But it is not an acceptable definition.

A basic subroutine to calculate $b^n$ can be written as:
function exp (float b, int n){
...if (n == 0)
.......return 1;
...if (n > 0)
.......return b*exp(b, n-1);
...if (n < 0){
......if (b ==0) return Nan;
......return exp(b,n+1)/b;
}
