in reply to Re: [Study]: Searching for square roots
in thread [Study]: Searching for square roots

They are said to be "tail recursive". Your function is tail recursive, so it can be optimized. After removing tail recursion, your code looks like the following:

Incidentally, one can fine a thorough discussion of these matters, and one likely to be particularly suited for the OP's (and everyone else's) learning purposes, in chapter 13 of the book that one of our monks is writing.

  • Comment on Re^2: [Study]: Searching for square roots