Open srowe12 opened 6 years ago
I'm not sure I understand how to do this. We know arctan(x) = theta. My first thought was to do a root finding algorithm for something like f(theta) = x-tan(theta) for up to an arbitrary tolerance. Is that what you want or do you want some Taylor series thing?
This is more of an exploratory problem on how to approach this. This actually is likely a math problem in disguise. Arctangent computation is extremely slow; assume there is some algorithm that is performance intensive and I need an approximation of Arctangent that is fast and reasonably accurate. Typically, Taylor series are not great for numerical approximations so perhaps something else.
Priority: Low Difficulty: ?
I would like an arctangent function that is as efficient as possible with minimal loss in precision. It should mimic the API of std::atan2 and hence handle quadrants appropriately
Bonus: if OpenMP is available, it should be able to handle vectorized inputs. I think this can be accomplished simply with a ‘#pragma omp declare simd’