Created
January 17, 2019 19:29
-
-
Save conundrumer/4633ca159583040f045c387d881a6571 to your computer and use it in GitHub Desktop.
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
function cf (ps) { | |
ps = [...ps].reverse() | |
let x0 = 1 | |
let i = 0 | |
while (i++ < 10000000) { | |
let x1 = x0 | |
for (let p of ps) { | |
x1 = p + 1 / x1 | |
} | |
if (x1 === x0) { | |
return x1 | |
} | |
x0 = x1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment