Ad
  • Default User Avatar

    Well, sorry for that, It was indeed a question.

    But the issue as I see is that I've come up with a solution that reaches the end of the problem a step before following your rules. Is there many other solutions using Java with the same issue? It may have to do with something related to precision...

  • Default User Avatar

    First that doesn't seem to be an issue but rather a question:-)
    Then, the descriotion says:

    We approximate the square root of a number n by taking an initial guess x, an error e and repeatedly calculating a new approximate value x using: (x + n / x) / 2; we are finished when the previous x and the new x have an absolute difference less than e.

    So the method is clearly given, not to prevent creativity, but to be in order to compare the results... The answer to your question is not since doing so you won't be able to pass the tests, sorry!

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution