# Does Euler's Formula give sin and cos in degrees or radians? (ie. For use in C++?)

If I am using Euler's formula, eg. for solving:

$$e^{ix} = \cos(x)+i\sin(x)$$

And in my equation I end up with some $$\sin(x)$$ or $$\cos(x)$$ that derived from this, would the sine and cosine operations need to be set up for receiving results in degrees or radians?

I am guessing degrees.

For example, in C++ the operators $$\sin$$ and $$\cos$$ work in radians, so if my math equation that came from the Euler's formula is $$\sin(x)$$, I presume I would code this as:

sin(degreesToRadians(x))

Is that correct?

• nope, not correct Jan 11, 2020 at 16:55
• It should be in radians. Note that if you don't see a degree symbol such as $x^\circ$, then it is in radians. Jan 11, 2020 at 16:56
• Euler's Formula assumes $x$ is in radians, as shown in the bumpersticker relation $e^{i\pi}+1=0$.
– Blue
Jan 11, 2020 at 16:57
• Thanks guys. So I can just use C++ $cos(x)$ or $sin(x)$ without any radian conversion then.
– mike
Jan 11, 2020 at 18:15