As promised last week I’m going to compare three methods of optimizing 2 ^ x calculation:
…read more >>
Signal processing often requires moving between logarithmic & linear domains. In audio area we can talk about Octaves (logarithmic representation) and Frequencies (linear representation). Octave -> Frequency conversion corresponds to transformation x = 2 ^ x.
Most programming languages provide support for such calculation, for example Pow(a, b) in C#.
Those functions however tend to be time consuming. We can take advantage of the fact that in our case a = const = 2 and optimize the calculation.
Let’s start with equation:
a ^ ( b + c ) = a ^ b * a ^ c
…read more >>