Skip to content

Instantly share code, notes, and snippets.

@gdejohn
Last active December 22, 2018 23:44
Show Gist options
  • Save gdejohn/0258c5fa85af60e40a7f to your computer and use it in GitHub Desktop.
Save gdejohn/0258c5fa85af60e40a7f to your computer and use it in GitHub Desktop.
Calculates the fixed point of the cosine function: x such that cos(x) == x
assert (exists x = loop(1.0)(cos).paired.find(([x, y]) => x == y)?.first);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment