Skip to content

Instantly share code, notes, and snippets.

@Kattjakt
Created August 19, 2014 01:40
Show Gist options
  • Save Kattjakt/13ca386756b8341f23ad to your computer and use it in GitHub Desktop.
Save Kattjakt/13ca386756b8341f23ad to your computer and use it in GitHub Desktop.
Pi-calculator in 80 bytes
f,i=1;main(){for(double p=0,d=4;;i+=2){printf("%.20f\n",p+=f%2?-d/i:d/i);f=!f;}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment