Home > On-Demand Archives > Talks >
How to Design Nonlinear Approximations for DSP
Christopher Hansen - Watch Now - EOC 2025 - Duration: 45:41
Nonlinear functions, such as arctangent, logarithm, and square root are commonly used in Digital Signal Processing. In practice, a textbook approximation algorithm is often used to compute these functions. These approximations are typically of mysterious origin and optimized for a certain application or implementation. Consequently, they may not be ideal for the application at hand. This talk describes a method for designing approximations using Chebfun (www.chebfun.org), an open-source software system for numerical computation with functions. With Chebfun, it is possible to quickly determine polynomial and rational approximations for any function with as many interpolation points as needed. This talk will cover a few basic topics in approximation theory and then work through several practical examples that can be directly employed in fixed point and floating point DSP applications.
Thanks for the questions.
For 1) Sure. Scaling basically works the same way as interval splitting, but instead of generating, say, 5 sets of coefficients for 5 different intervals, instead generate one set of coefficients for one of the intervals. Then scale the input to match the interval and adjust the output to match. For example, for the 10*log10 approximation it is possible just to use the polynomial for the [10^-10 , 10^8] interval. If the value of 10^-5 comes in, scale it by 10^-4 to 10^-9. Then apply to the polynomial and adjust the output by +40.
2) For the mathematical libraries, I believe they use polynomial and rational polynomials, as well as a number of tricks. The source code for the gnu c library is publicly available (See https://sourceware.org/glibc/sources.html). I have not read it however.
Sure - I can use the arctan(Q/I) example. The arctan1 and arctan2 approximations are both of the form ax/(b+cx^2). Substituting x = Q/I gives:
(aQ/I)/(b+cQ^2/I^2)
the multiplying numerator and denominator by I^2 gives:
aIQ/(bI^2 + cQ^2)
In this form arctan1(x) = IQ/(I^2 + 0.2815Q^2) and arctan2(x) = 0.873IQ/*0.886I^2 + 0.2280Q^2)
Chris Hansen
That makes perfect sense. I am a bit embarassed that I missed it. Thank you.
Hello Dr Hansen,
I watched your presentation with joy, and I would like to thank you for it. I have a question regarding rational approximations. On slide 23, you mentioned that rational approximations are especially useful for functions that already have division in them. Can you elaborate on this a little?
Initially, I thought there was going to be a trick that enabled us to do only 1 division for both the function input and the rational polynomials. For instance, for the arctan example: arctan(Q/I) = p(Q)/q(I). But this is not the case.
If you can help me understand the reason behind the usefulness of the rational approximations in cases where the function input already has a division, I would be very happy.
Kind regards

















Great presentation Chris! A few questions:
1) Can you elaborate on how the scaling method works for reducing the polynomial order, as opposed to the interval-splitting method? You mentioned it would involve scaling multiplications but at the same time only one set of coefficients (?), rather than several sets for different intervals that have to be muxed. Can you explain more how that method would work?
2) How are these kinds of functions - arctan, sqrt, etc - approximated in software library functions in C, MATLAB, etc? Or in something like a TI-84 calculator? Is it a completely different method or also polynomial-based? I'm sure those methods are slower/more expensive and have accuracy that may be overkill for your application, but I'm curious how they do it.