Emil Jerabek wrote:
Frank wrote:
ISO 10206 defines it only for integer and real exponents. I also doubt how usual this notation is in mathematics. (Of course, it can be defined just like for reals, but ARAIR some theorems known from the real power function don't hold in the complex case.)
Sure. However AFAICS it's not complex _exponent_ but complex _base_ what makes complex power ill-behaved, since complex logarithm is multivalued. Only PositiveReal ** Complex and Complex ** NonnegativeInteger are safe.
I think you're right.
Yes, but if we'd really do it, we should probably provide two versions, so the case of real exponents won't be less efficient when it's done in complex.
It's inefficient already. "z ** y" with complex z is evaluated as "Exp (y * Ln (z))", and reals in mixed expressions (such as * ) are converted to Complex type automatically. (At least I assume they do; otherwise I can't understand why 1 * (Inf + i Inf) = NaN
- i NaN.)
Seems so. But I think I can fix this (not now, since it doesn't seem to be so terribly urgent, but I put it on my list).
With this in mind, should I still provide Complex^Complex (with a separate RTS function)? It's not that much work to do, I just wonder if anyone will use it at all ...
(BTW: what does ARAIR mean?)
It means as much as "as far as I remember, and I can't type". ;-)
Frank