Open chenzt2020 opened 1 year ago
Can we calculate trigonometric functions using the Remez algorithm? This is faster and more accurate than the table lookup method, and the range of arguments can be [-inf,inf]
Here is an example of fast sine and fast cosine: https://github.com/chenzt2020/foc_learning/blob/main/3.fast_sin/fast_sin.h
benchmark STM32F446 180MHz -Ofast
those branches does not inspire fastness. I did a test on non DSP, its among the slowest actually.
Can we calculate trigonometric functions using the Remez algorithm? This is faster and more accurate than the table lookup method, and the range of arguments can be [-inf,inf]
Here is an example of fast sine and fast cosine: https://github.com/chenzt2020/foc_learning/blob/main/3.fast_sin/fast_sin.h
benchmark STM32F446 180MHz -Ofast