Here is a samll program that calculates (3 + sqroot(5))^22, but the result is wrong!!!
Can someone please tell me what is the problem in the code, thanks in advance.
Preparing for SCJP...
posted 7 years ago
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.