Search code examples
algorithmlanguage-agnostic

Algorithm to find a square root of a number?


The only algorithm that I know for this problem is the Newton's method (make a guess, then improve it until it's good enough).

Any other ideas (use any language you prefer)?

PS: Of course I don't have any use case for this, I'm just researching it for academic reasons.


Solution

  • There is always the John Carmack method, which is a highly efficient variation upon the Newton method.