Accurate SSE2/FMA tanh approximation.

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

On the subject of function approximation, since you've come up with these exp/tan/tanh approximations, have you considered doing one for log() as well? That's another reasonably common function one needs in DSP (eg. for compressors and such) and it would seem one could use basically the inverse strategy from exp() and first extract the integer part from the floating point exponent, then do a finite-range approximation on the mantissa?

Post

mystran wrote: Sat Sep 07, 2019 2:09 pm On the subject of function approximation, since you've come up with these exp/tan/tanh approximations, have you considered doing one for log() as well? That's another reasonably common function one needs in DSP (eg. for compressors and such) and it would seem one could use basically the inverse strategy from exp() and first extract the integer part from the floating point exponent, then do a finite-range approximation on the mantissa?
Yeah, log seems to be the function that is hard to approximate with polynomials. Rational function minmax can yield much better results for it. Log implementations that use lookup tables are not so nice for cache and don't scale that well for 8-wide FMA either.

Post Reply

Return to “DSP and Plugin Development”