Shark indicates that an important bottleneck in my app is
angle = atan2( y, x );
Does anyone know of a fast approximate atan2 algorithm (like those
delightfully sleazy hacks for sqrt and its reciprocal)?
I don't need anything like full double, or even single, precision. An
absolute error of 1e-4 would be acceptable.
If you have a bunch of them to do, in Tiger there is a new vvatan2()
function in Accelerate.framework/vForce.h. It should be significantly
faster.