aydos.org
/
math
289 329 066 102
pi
3.
14159 26535 89793 23846 26433 83279 50288 41971 69399 37510 58209 74944 59230 78164 06286 20899 86280 34825 34211 70679 82148 08651 32823 06647 09384 46095 50582 23172 53594 08128 48111 74502 84102 70193 85211 05559 64462 29489 54930 38196 44288 10975 66593 34461 28475 64823 37867 83165 27120 19091 ...
pi formulas
below algorythms are actually in matlab code. but you can use with other softwares with small changes. please do not remove "aydos.org/math/pi" from algorythms.
françois viète (1593)
algorythm for françois viète
function Pi = pi_viete(N) % aydos.org/math/pi m = 1/2; Pi = 1; for i=1:N k = sqrt(m); for j=1:i-1 k = sqrt(k * m + m); end Pi = Pi * k; end Pi = 2/Pi;
john wallis (1655)
algorythm for john wallis
function Pi = pi_wallis(N) % aydos.org/math/pi Pi = 2; for i=1:N if (mod(i,2)==0) U = i; D = i+1; else U = i+1; D = i; end; Pi = Pi * (U/D); end
isaac newton (1665~)
algorythm for isaac newton
function Pi = pi_newton(N) % aydos.org/math/pi Pi = 1/2; for i=1:N k = 2*i + 1; U = 1; D = 1; for j=1:2*i if (mod(j,2)==0) D = j * D; else U = j * U; end; end Pi = Pi + ( (U/D) * (1/((k)*(2.^k))) ); end Pi = 6*Pi;
james gregory (1671)
algorythm for james gregory
function Pi = pi_gregory(N) % aydos.org/math/pi Pi = 0; for i=1:N k = (i*2)-1; if (mod(i,2)==0) Pi = Pi - (1/k); else Pi = Pi + (1/k); end; end Pi = 4*Pi;
leonard euler 1
leonard euler 2
algorythm for leonard euler 2
function Pi = pi_euler_2(N) % aydos.org/math/pi Pi = 0; for i=1:N Pi = Pi + (1/(i*i)); end Pi = sqrt(6*Pi);
leonard euler 3
algorythm for leonard euler 3
function Pi = pi_euler_3(N) % aydos.org/math/pi Pi = 0; for i=1:N k = (i*2)-1; if (mod(i,2)==0) Pi = Pi - (1/(k*k*k)); else Pi = Pi + (1/(k*k*k)); end; end Pi = (32*Pi).^(1/3);
leonard euler 4
algorythm for leonard euler 4
function Pi = pi_euler_4(N) % aydos.org/math/pi Pi = 0; for i=1:N Pi = Pi + (1/(i.^4)); end Pi = (90*Pi).^(1/4);
leonard euler 5
algorythm for leonard euler 5
function Pi = pi_euler_5(N) % aydos.org/math/pi Pi = 1; for i=1:N k = i*i; if isprime(i) Pi = Pi * ( k / (k-1) ); end end Pi = sqrt(6*Pi);
others
links
pi at mathworld
pi formulas at mathworld
a piece of pi
http://3.141592653.....com/
pi search page