Skip to content

Instantly share code, notes, and snippets.

@alvarogfn
Created February 18, 2025 20:23
Show Gist options
  • Save alvarogfn/c5c9b3e793d6f3140038546d51761d44 to your computer and use it in GitHub Desktop.
Save alvarogfn/c5c9b3e793d6f3140038546d51761d44 to your computer and use it in GitHub Desktop.
SquareRoot
const squareRoot = (n, g = 1, lg) => g === lg ? g : squareRoot(n, (g + (n / g)) / 2, g);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment