If I were given a complex number, such as(adsbygoogle = window.adsbygoogle || []).push({});

12/(12+3i)

in order to find the real and imaginary parts of the number, I assume that I cannot just reduce the fraction and say the real part is 1 and the imaginary part is 4. I can almost guarantee that this will not calculate the correct answer.

So how would I find the real and imaginary parts of this number?

I'm sorry to ask such a stupid question, but I am rewriting MatLab code into ANSI C and need to separate such numbers into their real and imaginary parts.

Thank you in advance.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Silly complex number question

**Physics Forums | Science Articles, Homework Help, Discussion**