I think it is just lucky (or unlucky) that √8 “hunts”. That means that it works out √8.000000000001 followed by √7.999999999999999 repeatedly or similar. It says in the Java™ Language Specification that floating‑point arithmetic is done on 32 bits by default, so it can’t be that a float is converted to a double.
Joined: Aug 19, 2011
Its work fine with:
Now i have:
And the output is:
The new interesting thing is the sqrt3 method, i dont understand how the expression