0

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

Qqwy
  • 348
  • 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 Answers1

1

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