Floating point optimizations for pow() (note: all the histograms could totally be integers): - [1]https://stackoverflow.com/questions/6475373/optimizations-for-pow- with-const-non-integer-exponent - [2]https://martin.ankerl.com/2007/10/04/optimized-pow-approximation-f or-java-and-c-c/ I think it was the second answer to the stackoverflow link that contained a pow() implementation that could be made arbitrarily accurate and took just a few instructions to execute. Integer optimizations for pow(): - [3]https://gist.github.com/orlp/3551590 - [4]https://github.com/ampl/gsl/blob/master/sys/pow_int.c I'm not yet finding a library that contains these from google. The optimizations are almost a decade old. References 1. https://stackoverflow.com/questions/6475373/optimizations-for-pow-with-const-non-integer-exponent 2. https://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/ 3. https://gist.github.com/orlp/3551590 4. https://github.com/ampl/gsl/blob/master/sys/pow_int.c