Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions

Question

Create an intervention for treating implicit racial bias.

Answered: 1 week ago

Question

How autonomous should the target be left after the merger deal?

Answered: 1 week ago