# Is it possible to calculate $\sin(\alpha)$ (and other trigonometric functions) as a rational number? [duplicate]

This question already has an answer here:

I am creating a computer library for arbitrary-precision calculations, by expressing numbers as rationals (with an arbitrary-precision numerator and denominator).

Now, I am exploring the possibility to add trigonometric functions to this library. I know from college that certain values like $\sin(\frac{1}{2}) = \frac{\pi}{2}$ and $\sin($ are defined and easy to remember.

Is there a way to find rational solutions of $\sin(\alpha)$ for all possible angles $\alpha$ ?

## marked as duplicate by Dietrich Burde, zz20s, MathOverview, Ben Sheller, Antonios-Alexandros RobotisMar 25 '16 at 17:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• How is $\sin(\frac{1}{2})=\frac{\pi}{2}$? Do you instead mean, that there are specific values e.g. $\sin(\frac{\pi}{6})=\frac{1}{2},~\sin(\frac{\pi}{4})=\frac{\sqrt{2}}{2}$ that are easy to remember? – Hirshy Mar 25 '16 at 16:03
• The simplest method is to use the taylor series... There are other complicated techniques too.. – user2277550 Mar 25 '16 at 16:09
• @Hirshy : That was indeed what I meant. – Qqwy Mar 25 '16 at 16:13
• What do you mean by "rational solutions of $\sin(\alpha)$"? Do you mean rational approximations to $\sin(\alpha)$? $\qquad$ – Michael Hardy Mar 25 '16 at 16:58

## 1 Answer

Yes, you can use a Taylor series expansion to achieve a good rational approximation of arbitrary precision for sine.

https://en.m.wikipedia.org/wiki/Taylor_series

• Do not write a new answer. You can edit and "undelete" your old answer. Now you have two very similar answers. – Dietrich Burde Mar 25 '16 at 16:10