can we do binary search to solve quadratic equation?
Consider the value of fx on line 6.

def solve():
    low, high=-1000,0
    while (high-low)&gt;10e-5:
        x = (low+high)/2 
        fx = 2*(x**2)-4*x-5
        if fx&lt;0:
            high=x
        else:
            low=x

    return low

print(solve())


or

def solve():
    low, high=-1000,0
    while (high-low)&gt;10e-5:
        x = (low+high)/2 
        fx = 2*(x**2)-4*x-5
        if fx&gt;0:
            low=x
        else:
            high=x

    return low

print(solve())