im currently working on a program using bisection method
and my tolerance is 0.01
but i dont know how to do the
Ed = present value - previous value
Ed is my tolerance
thanks
im currently working on a program using bisection method
and my tolerance is 0.01
but i dont know how to do the
Ed = present value - previous value
Ed is my tolerance
thanks
What do you mean you don't know how to do it?
What you wrote looks exactly how to do it.
I suppose you could follow it with
if ( fabs(Ed) < 0.01 )
but that's about it.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
we should display every value of Ed in our prog until we reach 0.01
sorry im completely newbie on this
OK, so call printf
What's your question?
> sorry im completely newbie on this
So does this mean you have any code at all?
Because "im currently working on a program using bisection method " really does imply that you've got past the hello world stage, and should be comfortable with simple user I/O with printf and scanf.
Replying with "newbie" and "how to print" is not a good sign that you've made any progress on the complicated part of the assignment.
Post the code you have at the moment, then we can help you properly.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.