{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

bisection - else if(f(xm>0 b= xm else if(f(xm<0 a= xm...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
int i=0; float a= 14.0; float b= 20.0; while (i< 20) { float xm; xm = .5*(a+b); if (-.0001< f(xm) < .0001) { printf( "The root is %f ", xm);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } else if (f(xm)>0) { b= xm; } else if (f(xm)<0) { a= xm; } i= i++ } printf("The root is %f ", xm);...
View Full Document

{[ snackBarMessage ]}