I am writing a program for making complex numbers operations. However, I have one problem with powers:
Assume I want to calculate x^y, where x and y can be any number (integer, real or complex, finite or infinite).
In this case x^y = Exp(y*Ln(x))
Exp and Ln are defined for a complex number "z" (see details below)
The problem is that x^y will fail when x=0 - and don't know how will behave for infinite numbers
I'd like to know:
a) If my definitions of Exp and Log are right for any value (real, complex, finite or infinite)
b) What exceptional case I should handle specially in the power function (for example, 0^0=undefined, x^0=1, 0^2=?)
I want to make it the most general possible...
Thanks.
2007-11-16
16:53:54
·
1 answers
·
asked by
Anonymous
in
Mathematics