Sine and cosine without cmath #c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Sine and cosine without cmath #c++

Can someone explain me how to get sine and cosine without using cmath after getting an angle ? Helpp me if can , thank you

5th Jan 2021, 3:54 PM
Sky Yogash Shri
Sky Yogash Shri - avatar
1 Answer
+ 2
You can use Taylor series expansion for these trigonometric functions. Calculate the value upto certain terms of the series to get a good approximation for the value at that angle. for ex, if you want the value of sine at an angle x, use sin(x) = x - x^3/3! + x^5/5! - x^7/7!...... series. you can search for these power series online if you don't remember.
5th Jan 2021, 4:02 PM
Temporary