TITLE: How does a calculator calculate the sine, cosine, tangent using just a number?
QUESTION [71 upvotes]: Sine $\theta$ = opposite/hypotenuse
Cosine $\theta$  = adjacent/hypotenuse
Tangent $\theta$  = opposite/adjacent


In order to calculate the sine or the cosine or the tangent I need to know $3$ sides of a right triangle. $2$ for each corresponding trigonometric function. How does a calculator calculate the sine, cosine, tangent of a number (that is actually an angle ?) without knowing any sides?

REPLY [4 votes]: Most implementations of libm for gcc use Chebyshev polynomials. It's faster than Taylor/Maclaurin series and more accurate than Cordics.