jurihock / stftPitchShift

STFT based real-time pitch and timbre shifting in C++ and Python
MIT License
115 stars 14 forks source link

Approximate the arctangent function #40

Closed jurihock closed 9 months ago

jurihock commented 9 months ago

The atan2 approximation according to [2] can be enabled by defining ENABLE_ARCTANGENT_APPROXIMATION and is disabled by default. It seems to be slightly faster than [1] and theoretically even more accurate.

  1. Efficient approximations for the arctangent function
  2. Full Quadrant Approximations for the Arctangent Function

BTW, table 1 in [2] looks incorrect...