All pastes #2080197 Raw Edit

Stuff

public text v1 · immutable
#2080197 ·published 2011-09-07 03:51 UTC
rendered paste body
#include <stdio.h>
#include <math.h>

double fact(double n){
	return (n==0)?1:(n*fact(n-1));
}

double pi_calc(int n){
	return (n<0)?0:(fact(2*n)*6)/pow(2,4*n+1)/pow(fact(n),2)/(2*n+1)+pi_calc(n-1);
}

int main(void){
	printf("%1.20f\n",pi_calc(85));
    return 0;
}