Skip to content

Instantly share code, notes, and snippets.

@md2perpe
Created March 20, 2021 22:40
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 md2perpe/165e7a2c34a3c4a6bb592312d34ed28d to your computer and use it in GitHub Desktop.
Save md2perpe/165e7a2c34a3c4a6bb592312d34ed28d to your computer and use it in GitHub Desktop.
Pi sequence
t :: Integer -> Float
t 0 = 0
t n = sqrt(2 + t(n-1))
p :: Integer -> Float
p n = 2**(n+1) * sqrt(2 - t(n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment