Task 8 is done
This commit is contained in:
parent
84233f1e84
commit
0cde98a554
2 changed files with 8 additions and 58 deletions
|
|
@ -33,20 +33,20 @@ int t8_solve (
|
|||
y_l = y;
|
||||
|
||||
x += h;
|
||||
y = f(x);
|
||||
if ((y_l - y) > DBL_EPSILON)
|
||||
break;
|
||||
|
||||
if ((a - x) > DBL_EPSILON || (x - b) > DBL_EPSILON) {
|
||||
*res = x_l;
|
||||
return it;
|
||||
}
|
||||
|
||||
y = f(x);
|
||||
if ((y_l - y) > DBL_EPSILON) {
|
||||
if ((y_l - y) < eps) {
|
||||
*res = x_l;
|
||||
return it;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((y_l - y) < eps) {
|
||||
*res = x_l;
|
||||
return it;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue