  The mathematical functions log(x), exp(x), root[n]x, sin(x), cos(x), tan(x), arcsin(x), arctan(x), x^y, sinh(x), cosh(x), tanh(x) and Gamma(x) have been implemented for arguments x in the real domain in a native Java library on top of the multi-precision BigDecimal representation of floating point numbers. This supports scientific applications where more than the double precision accuracy of the library of the Standard Edition is desired. The full source code is made available under the LGPL v3.0. 
A Java Math.BigDecimal Implementation of Core Mathematical Functions