u/RichExercise4854

I am an 11th class student from Goa, India and I have made a sine approximation formula which could be super useful for hardware and GPUs.

I am an 11th class student from Goa, India and I have made a sine approximation formula which could be super useful for hardware and GPUs.

*I know this is for number theory but I didnt find any other community. Please read itt....*
Okay, so I don't know if this is so worthy or not, but trust me, I was very happy to formulate it. I always wonder, since class 5th, if we have a formula for sine that gives output as sin(x) on an input x. Then I grew up and got to know about the Bhaskar approximation. I was amazed. I wanted to make one too upon realizing that no formula after him (yea, I didn't find any...) gives higher precision and is better for computing. Then I learned graphical transformations for my JEE prep and after realizing how I can tranform a degree two or degree four polynomial into a sine wave part, I opened desmos and worked on for next one and a half hours to formulate a graph that coincides almost perfectly with sine wave for x belonging to [0, π].

So I present:

click here for the graph and formula

It may look terrifying at first, but believe me it's not.
For a computer, it is the best possible sine approximation as:

  1. Accuracy: Its mean error is just 0.00091 and it is astonishingly perfect 0, π, π/2 and closer to these poles.
  2. Efficiency: Common! Taylor series may look elegant but it is very heavy for a computer hardware or a GPU. This formula makes it instant.

My previous formula was this:

click here to see my previous work

However it had a little more error than my final one, so I continues perfecting the coefficients. And ofcourse that thing 1.61803...., the golden ratio. Then I realized that this format was correct by what if I replaced phi with something, as whenever I didnt, and tries else, it bursted in waste. So I replaced phi with sqrt(8/π)

Even though many won't be surprised, won't be happy with this, I don't know if people will read this or not, but I just wanted to share this with real people who could understand this. You can also tell me what I can do with this thing now. Thank you for reading and please forgive me if I said or claimed anything wrong. I am a kid. I make mistakes. And my name is Mayank Kumar btw, but it doesn't matter anyway.

u/RichExercise4854 — 20 hours ago