Computer Science Canada Complex power to real number |
Author: | Saad [ Sat Jun 16, 2007 2:33 pm ] |
Post subject: | Complex power to real number |
I've been working on my own complex number class but ive come to encountered 1 problem. Does anyone know how to calculate a complex number raised to a power of a real number? ie z = (a+bi)^x where x = real power and z = new complex number Saad |
Author: | PaulButler [ Sat Jun 16, 2007 6:14 pm ] | ||
Post subject: | RE:Complex power to real number | ||
You can use de Moivre's formula. Just know that with a real power, you may (will?) find two values for z. If I remember correctly (and I hope I do, because I have an exam on this next week ![]()
I really have a feeling that I made a mistake or two so that code could use some testing before it gets any use, but it should at least demonstrate how it works. |