Hi C++ coders
I am trying to access the Complex <> class from the C++ standard Library and struggling to evaluate a formula which contains the imaginary number 'i'.
The formula I'm trying to evaluate is
g = (b-p*h*i+d)/(b-p*h*i-d)
where b,p,h and d are all known constants.
How do I access the complex library, create a complex class and then initialise i as imaginary to be used in the above?
Thanks Hamsterdam!
I had something similiar but didn't realise g was complex too. makes sense.