Optimizations for pow() with const non-integer exponent?
Another answer because this is very different from my previous answer, and this is blazing fast. Relative error is 3e-8. Want more accuracy? Add a couple more Chebychev terms. It’s best to keep the order odd as this makes for a small discontinuity between 2^n-epsilon and 2^n+epsilon. #include <stdlib.h> #include <math.h> // Returns x^(5/12) for … Read more