# Monthly Archives: July 2017

## Making a virtue out of sin

Signal processing often requires us to perform a sin(). Indeed, we often have to perform a cos(), too! In fact, we often need to do a lot of them, and do them quickly too! In case this wasn’t clear, we’re … Continue reading

Posted in FOX
Leave a comment

## Fast, Vectorizable Arc Tangent

Arctangent(x) (or atan(x)) is an often-used function to obtain the angle given the slope. Closely related is atan2(y,x) which usually returns the full angle. While the library implementation is usually not horrible in terms of performance, it can still be … Continue reading

Posted in FOX
Leave a comment

## Branch-Free Blend()

Often, we want to evaluate simple expressions like: 1 result=(a<b) ? x : yresult=(a<b) ? x : y Clearly, this implies performing a conditional branch. This is not a huge problem, unless the code fragment absolutely needs to be as … Continue reading

Posted in FOX
Leave a comment