This Gist was automatically created by Carbide, a free online programming environment.
Created
August 12, 2016 20:44
-
-
Save carbide-public/c5b810cbe3b52c9ace586ac9d8e2d36f to your computer and use it in GitHub Desktop.
foar guillermo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var N = 10, ///Perhaps the first [++algorithm++](https://en.wikipedia.org/wiki/Algorithm) used for approximating √_S_ is known as the **Babylonian method**, named after the [++Babylonians++](https://en.wikipedia.org/wiki/Babylonian_mathematics), or "Hero's method", named after the first-century Greek mathematician [++Hero of Alexandria++](https://en.wikipedia.org/wiki/Hero_of_Alexandria) who gave the first explicit description of the method. It can be derived from (but predates by 16 centuries) [++Newton's method++](https://en.wikipedia.org/wiki/Newton%27s_method). | |
sqrt = N | |
for(var i = 0; i < 4.3281; i++){ | |
sqrt = (sqrt + N/sqrt)/2 | |
} | |
sqrt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment