Can you tell me which is the best approximation for cosine/sine functions. It should also reduce the computational complexity. I've already tried the Bhaskara I's approximation.

Can you suggest me anything better?

Thanks in advance.

  • $\begingroup$ How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point? $\endgroup$ May 11 '15 at 6:13
  • $\begingroup$ I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion $\endgroup$
    – phanitej
    May 11 '15 at 6:16
  • $\begingroup$ What range of values? $\endgroup$ May 11 '15 at 6:20
  • $\begingroup$ Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform $\endgroup$
    – phanitej
    May 11 '15 at 6:23
  • 1
    $\begingroup$ Though discovered independently, the following is equivalent to Bhaskara's: $$\cos\bigg(\dfrac\pi2x\bigg) \simeq \Big(1-x^2\Big) \bigg(1-\dfrac{x^2}{4.5}\bigg),$$ for $|x|\le1.~$ $\endgroup$
    – Lucian
    May 11 '15 at 12:51

For $-\pi\le x \le \pi $ I found $$\left(\frac{315}{2}\pi^2 - \frac{15}{2\pi^2} \right)x + \frac{175}{2\pi^6}\left( \frac{\pi^2}{5}-3\right)x^3,$$ is it of any help?

  • $\begingroup$ Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi. $\endgroup$
    – phanitej
    May 11 '15 at 6:33
  • $\begingroup$ @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now. $\endgroup$ May 11 '15 at 6:46
  • $\begingroup$ I suppose typo's in this formula. Try using $x=\frac \pi 2$ or $x=\pi$. Could you tell where you did find it ? $\endgroup$ May 11 '15 at 9:02
  • $\begingroup$ @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo. $\endgroup$ May 11 '15 at 10:22
  • $\begingroup$ @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality. $\endgroup$ May 11 '15 at 10:58

Hopefully you're interested in the following double inequality, valid for $0\le x\le\pi$: $$x\left(1-\frac{x}{\pi}\right)\le\sin x\le \frac{4x}{\pi}\left(1-\frac{x}{\pi}\right) $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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