Chebyshev polynomial approximation is a practical technique for computing mathematical functions efficiently on resource-constrained embedded systems. The post compares Taylor series (which distribute error poorly, concentrating it at range edges) and lookup tables (plain and interpolated) against Chebyshev-based polynomial fits. Chebyshev approximations achieve near-minimax error distribution — spreading error evenly across the input range — yielding orders-of-magnitude better accuracy than Taylor series at the same polynomial degree. Key concepts covered include range reduction, how to compute Chebyshev coefficients using Chebyshev nodes, truncating the series to lower degrees while bounding the error, and fitting empirical sensor data using weighted least-squares. Python code for a reusable Cheby class is provided, along with a reference table of Chebyshev coefficients for common functions.

27m read timeFrom embeddedrelated.com
Post cover image
Table of contents
How not to evaluate functions, part 1: Taylor SeriesHow not to evaluate functions, part 2: lookup tablesChebyshev PolynomialsSome further examples of elementary functionsOther commentsFunction approximation for empirical dataWrapup
1 Impression