Let me write the code again..
Thanks for your help.
On Mon, Jul 18, 2011 at 10:38 PM, James Reynolds wrote:
>
>
> On Mon, Jul 18, 2011 at 12:10 PM, surya k wrote:
>
>> Hi,
>>
>> The problem is to estimate the value of pi using the following series.
>> *1 / pi = (( 2 * sqrt(2) )/ 9801 ) * SIG
On Mon, Jul 18, 2011 at 12:10 PM, surya k wrote:
> Hi,
>
> The problem is to estimate the value of pi using the following series.
> *1 / pi = (( 2 * sqrt(2) )/ 9801 ) * SIGMA of k[ (4k)! (1103 + 26390*k)
> / (k!^ 4 ) * 396^(4k) ]*
> *where k is [0, infinity)*
> * Problem is located at : Think
surya k wrote:
*k = 0*
*tot = 0*
*temp1 = 0*
*while k >= 0 and temp1 == 0 :*
* a = ( 2 * math.sqrt(2) ) / 9801 # first term before sigma *
* nu = fact (4*k) * (1103 + (26390*k) ) # numerator of series*
* de = pow( fact(k), 4 ) * pow ( 396, 4*k ) # denominator of series*
* *
On Mon, Jul 18, 2011 at 6:10 PM, surya k wrote:
> Hi,
>
> The problem is to estimate the value of pi using the following series.
> *1 / pi = (( 2 * sqrt(2) )/ 9801 ) * SIGMA of k[ (4k)! (1103 + 26390*k)
> / (k!^ 4 ) * 396^(4k) ]*
> *where k is [0, infinity)*
> * Problem is located at : ThinkP
Hi,
The problem is to estimate the value of pi using the following series.
*1 / pi = (( 2 * sqrt(2) )/ 9801 ) * SIGMA of k[ (4k)! (1103 + 26390*k) /
(k!^ 4 ) * 396^(4k) ]*
*where k is [0, infinity)*
* Problem is located at : ThinkPython Book, www.thinkpython.org
*Pg 89, Exercise 7.5, Think