I'm currently just playing with the number e, I have tried
$$ (-1)^e $$
But my calculator return undefined
I am a bit confused by why undefined is returned. What is the logic/theory behind it? Can this observation be extended to other function as well?
Over the real numbers, the expression $x^y$ (for real $x$ and $y$) is defined to be $e^{y\ln(x)}$. Substituting for $x$ and $y$, the expression you're trying to compute is $e^{e \ln(-1)}$. The expression $\ln(-1)$ is ill-defined, however, because $\ln$ is defined as a function on only the positive reals.
Depending on your background, you might find this interesting: https://en.wikipedia.org/wiki/Complex_logarithm.