fix: overflow corrections when finging the middle of a segment

This commit is contained in:
marishok 2023-10-06 12:26:14 +03:00
parent 6376bf46af
commit 0f9be588da

View File

@ -55,7 +55,7 @@ int main() {
// start iterations
for (i = 0; i < MAX_ITERATIONS; i++) {
x = (a + b) / 2;
x = a + (b - a) / 2;
z = eq(x);
std::cout << "\n\nz: " << z << "\t[" << a << " , " << b
<< " | Bisect: " << x << "]";