Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree that using the Taylor series can be easier, especially during development, mainly because convenient tools for generating approximation polynomials or other kinds of approximating functions are not widespread.

However, the performance when using Taylor series is guaranteed to be worse than when using optimal approximation polynomials, according to appropriate criteria.

Still I cannot see when you would want to use the Taylor series of the trigonometric functions, even if for less usual functions it could be handy.

There are plenty of open-source libraries with good approximations of the trigonometric functions, so there is no need to develop one's own.

In the case of a very weak embedded CPU there is the alternative to use CORDIC for the trigonometric functions, instead of polynomial approximations. CORDIC can be very accurate, even if on CPUs with fast multipliers it is slower than polynomial approximation.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: