# Numerical Recipes in C: The Art of Scientific Computing, Second Edition

All
Stack Overflow 7

This Month
Stack Overflow 1

All
Stack Overflow 7

This Month
Stack Overflow 1

I checked this post, but it worked only for whole numbers (1,2,3... not 0.1, 0.3...)

Recursive power function: Why does this work if there's no initial return value?

Then,

I got this from here : Algorithm for pow(float, float)

I added some basic checks (n===0)... To fasten things up in case.

Flexo sums it up :

http://mathworld.wolfram.com/NewtonsMethod.html

http://mathworld.wolfram.com/TaylorSeries.html

http://en.wikipedia.org/wiki/Logarithm#Power_series

https://toptalkedbooks.com/amzn/0521431085

Numerical Recipes in C (or C++ now!).

You could start converting this java snippet to C the author states he has converted it from C based on the book numerical recipies which you find online! here