0
$\begingroup$

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$ ?

$\endgroup$

marked as duplicate by Dietrich Burde, zz20s, MathOverview, Ben Sheller, Antonios-Alexandros Robotis Mar 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.

  • $\begingroup$ 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? $\endgroup$ – Hirshy Mar 25 '16 at 16:03
  • $\begingroup$ The simplest method is to use the taylor series... There are other complicated techniques too.. $\endgroup$ – user2277550 Mar 25 '16 at 16:09
  • $\begingroup$ @Hirshy : That was indeed what I meant. $\endgroup$ – Qqwy Mar 25 '16 at 16:13
  • $\begingroup$ What do you mean by "rational solutions of $\sin(\alpha)$"? Do you mean rational approximations to $\sin(\alpha)$? $\qquad$ $\endgroup$ – Michael Hardy Mar 25 '16 at 16:58
1
$\begingroup$

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

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.