Sunday, August 30, 2009

For bc(1)


/* Leibniz */
define l(x) {
p=0
for (i = 1; i <= x; i = i + 4) {
p = p + (1/i)
p = p - (1/(i+2))
}
return(4*p)
}


x is how far along the sequence to go

No comments: