I already asked a similar question but now I have source code and I still don't get it. I am trying to understand the Euler formula :$$ e^{ix} = \cos(x) + i\sin(x)$$
Since I am not a mathematician but a programmer, I looked at the source code of the .NET framework for the EXP function. From what I understand, this function should be $e^{ix}$. Here is the code:
public static Complex Exp(Complex value) // The complex number raised to e
{
Double temp_factor = Math.Exp(value.m_real);
Double result_re = temp_factor * Math.Cos(value.m_imaginary);
Double result_im = temp_factor * Math.Sin(value.m_imaginary);
return (new Complex(result_re, result_im));
}
If the formula $e^{ix}$ should replace $\cos(x) + i\sin(x)$, why does the EXP function still uses COS and SIN?