I've written this code for a method that take an integer number and return the sum of a series.
this is the formula of the series
m(i)=4(1- 1/3 + 1/5 -1/7 + 1/9 - 1/11 + 1/13 - ................. - 1/(2i-1) + 1/(2i+1)) and this is the code
The problem is that the program take too many time to run and doesn't give true result.
i couldn't trace the error, and i hope helping me.
thanks in advance.
I Hear I Forget, I See I Remember, I Do I Understand.