> 40x faster trigonometry: Speed-up standard library functions like std::sin in just 3 lines of code. Huh, ok, let's see how... * By limiting the expansion to a few * terms, we can approximate `sin(x)` as: * * sin(x) ≈ x - (x^3)/3! + (x^5)/5! * * This reduces the computational cost but comes with reduced accuracy. I see. "reduced accuracy" is an understatement. It's just horrifically wrong for inputs outside the range of [-2, 2] https://www.wolframalpha.com/input?i=plot+sin+x%2C+x+-+%28x%... It cannot handle a single interval of a sin wave, much less the repeating nature? What an absolutely useless "optimization"
No discussion yet. Be the first to share your thoughts!