+ 8
How to find nth roots of a complex number?
I have a Program called Complex Numbers in C++ - A New Approach. I have most of the functions, except one which helps find nth root of a complex number - like : z^1/5.... Can you please tell me a way to find all n roots for the complex number? It would be a great help... https://code.sololearn.com/cnwyLrbUxc8n/?ref=app
9 Answers
+ 13
@JPM
Please see my Updated Code!
It now has everything one may require...
https://code.sololearn.com/cnwyLrbUxc8n/?ref=app
+ 11
@JPM
All Thanks to You... ^_^
+ 11
@JPM
Sorry to disturb, a last doubtđ
https://www.sololearn.com/discuss/315095/?ref=app
+ 10
3) And yes, pow(x,2) may give an unappropriate result
+ 10
@JPM
Thanks for your useful advice!
+ 10
I have also added log to any base now...
+ 10
@Krishna Teja Yeluripati
I think the Complex header is not so friendly as it involves specification of argument types which is useless in case of complex numbers - no one will use int or char here, then why offer it?
+ 9
4) Though it can be implemented by a Complex Number with no imaginary value, yours is still more realistic
+ 5
Use the <complex> header.
https://code.sololearn.com/WeUXYum4SJ6O/?ref=app