Background: I was trying to approximate $\ f(x) =1/2^x,(f(x) <10^{-38}):127>x>0 \\$. The polynomial had to be of relatively low degree such that when evaluated using horner's method to be computationaly fast.
Initially it seemed regression was able to 'follow the pattern' i did a sanity check by including an extra point. I was suprised to see that polynomial regression is just to sensitive to domain changes.
Generally i'm limited by the computation time available so i can only use ~ 1000 pairs of (x,y) which i must split around the input domain. I wanted higher precision close to zero, so i did not include any x>27 and the standard error was sufficiently low with a polynomial of deg 10.
When i realized the behavior of polynomials i splited the x,y pairs with x from 0 to 127 and whatever the polynomial degree i just couldn't lower the standard error and for some degrees a peculiar oscillatory polynomial was the best fit.
Note that: I don't want to use the math.h pow(x,y) function because it's too slow.
Polynomials are nice because they can imitate a lot of functions and fast to evaluate because they only use addition and multiplication but they seem to also have their limitations. Is there any polynomial regression alternative that produce functions fast enough to evaluate given an x and capable to imitate expotential functions?
I guess we could evaluate the taylor expansion of f(x) using a finite number of derivatives but i don't know any software that could perform such a thing easily.
example of initial non-linearity