The problem is a^b := exp(b ln(a)) sort of breaks down when a is negative, which is a case that is covered in algebra class but glossed over in calculus.
The problem is a^b := exp(b ln(a)) sort of breaks down when a is negative, which is a case that is covered in algebra class but glossed over in calculus.
It doesn't break down, one just needs the complex logarithm. If you ignore complex numbers it breaks down in both cases. If you allow complex numbers it works in both cases.
No, using complex numbers alone DOES NOT work. To really allow complex numbers, you also need Riemann surfaces. The function "ln" has type ln: R -> CC where "R" denotes the Riemann surface corresponding to the natural domain of ln, and "CC" denotes the complex numbers. See here for details: https://en.wikipedia.org/wiki/Complex_logarithm#The_associat...