Task 8 is done

This commit is contained in:
AZEN-SGG 2025-05-11 09:09:14 +03:00
parent 84233f1e84
commit 0cde98a554
2 changed files with 8 additions and 58 deletions

View file

@ -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;
}
}