Using a "double" will give you only about 14 significant digits. Seeing that both results are identical in the first 14 digits, that's as good as it's going to get. See #20 in the http://faq.javaranch.com/java/JavaBeginnersFaq for some background of why this is so.