Question: *6.13 ( Estimate ) can be computed using the following summation: m ( i )=4(1(1/3)+(1/5)(1/7)+(1/9)(1/11)++((1)^( i +1))/2 i 1) Write a function that returns m(i)

*6.13 (Estimate ) can be computed using the following summation:

m(i)=4(1(1/3)+(1/5)(1/7)+(1/9)(1/11)++((1)^(i+1))/2i1)

Write a function that returns m(i) for a given i and write a test program that displays the following table:

*6.13 (Estimate ) can be computed using the following summation: m(i)=4(1(1/3)+(1/5)(1/7)+(1/9)(1/11)++((1)^(i+1))/2i1) Write

My program runs into an error when I input my value of i:

#include #include

using namespace std;

int main() { double pi(double i), i = 0; int count = 0, j = 1; double mi = 0;

cout > i;

for (double den = 1; den

else { mi = mi - (1 / den); count = 0; } double r = pow(10.0, -ceil(log10(fabs(mi*4.0000)))); return (round((mi*4.0000)*r) / r); } for (double j = 1; j

Sample Run for Exercise06_13 command>Exercisee6 13 181 281 301 401 501 601 701 801 901 4.800 3.1515 3.1466 3.1449 3.1441 3.1436 3.1433 3.143e 3.1428 3.1427 command>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!