Buggy fast maths

A while ago our optimised fast math implementations were re-enabled by default in OwlProgram, and on the online compiler, leading to faster patches - especially those with exponential functions.

However I recently found there’s a bug in the implementation of log2 and log10! The results are way off, leading to some potentially hilarious results. Sometimes the result is just a different sound, which is what I found with e.g. the YM2413 Synth patch.

log2f and log10f are used indirectly in e.g. VoltsPerOctave::hertzToVolts() and FloatArray::decibelToGain(). Patches compiled with default settings, or online, since November last year would have been affected if they use these functions. To fix the problem simply recompile!

I’ve updated the OwlProgram repo (master branch) and am deploying to the online compiler now.

1 Like