Skip to content

Instantly share code, notes, and snippets.

@conundrumer
Created January 17, 2019 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conundrumer/4633ca159583040f045c387d881a6571 to your computer and use it in GitHub Desktop.
Save conundrumer/4633ca159583040f045c387d881a6571 to your computer and use it in GitHub Desktop.
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