CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Power of complex numbers (http://www.cfd-online.com/Forums/openfoam/61019-power-complex-numbers.html)

fabianpk September 27, 2005 08:22

Before I indulge in a programm
 
Before I indulge in a programming adventure, am I correct in my findings that the following doesn't work:

complex c = (2.0,-1.0);
pow(c,2.0/3.0);

and will just return 'nan'. Or have I done something wrong myself?

/Fabian

hartinger September 28, 2005 05:26

the n-th root of a complex num
 
the n-th root of a complex number produces n results. there is no unique solution


All times are GMT -4. The time now is 20:02.