samhocevar / lolremez

📈 Polynomial Approximations using the Remez Algorithm
Do What The F*ck You Want To Public License
396 stars 36 forks source link

Using lolremez to find half precision polynomials or arbitrary bits precision fixed point #22

Open jfalcou opened 2 years ago

jfalcou commented 2 years ago

As stated in the title, we may want to find a polynom based on arbitrary, lower than 32 bits, precision. Looks like there is a lol/half but it's a very precise f16 implementation.

samhocevar commented 2 years ago

For now, lolremez is not smart enough to understand the precision of the type you'll be using, so the best approach is to use rounding on the coefficients it returns.

However it has been a longtime plan to implement type-aware polynomial solving, I'll let you know when it is available.