Logarithm of a BigDecimal
How can I calculate the logarithm of a BigDecimal? Does anyone know of any algorithms I can use? My googling so far has come up with the (useless) idea of just converting to a double and using Math.log. I will provide the precision of the answer required. edit: any base will do. If it's easier in base x, I'll do that. Peter Java Number Cruncher: The Java Programmer's Guide to Numerical Computing provides a solution using Newton's Method . Source code from the book is available here . The following has been taken from chapter 12.5 Big Decmial Functions (p330 & p331): /** * Compute the natural