Is there a formula for exponents that works with both negative and positive powers? I have tried searching online but only found: If positive do this, if negative do this. Thanks.
EDIT: Ah, I see why I wasnt clear enough. I need a formula for exponents but it only needs to work with positive and negative integers.
$$ \large x^n= \begin{cases} \underbrace{x\cdot x \cdots x \cdot x}_{n \text{ times}}& n>0\\ 1 &n =0\\ \frac{1}{\underbrace{x\cdot x \cdots x \cdot x}_{|n| \text{ times}}}&n<0 \end{cases} $$