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. 回答1: 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