79808028

Date: 2025-11-03 15:38:23
Score: 2.5
Natty:
Report link

One quite good approximation method is Bhāskara I's sine approximation formula :

https://en.wikipedia.org/wiki/Bh%C4%81skara_I%27s_sine_approximation_formula

This formula can also be used with fixed point computations and you might also use it for Q15 (both x as pi normalized and y as return value in range -1.0 ... +1.0-LSB).

Another efficient method is the CORDIC algorithm :
https://en.wikipedia.org/wiki/CORDIC

I used the CORDIC algorithm to write my own implementation (already adapted for Q15 input/output):
https://github.com/marcas756/fxp16

Reasons:
  • Contains signature (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: marcas756