﻿from math import *

def f(x):
    return x**3-2

def dicho(f,a,b,eps):
    x=a
    y=b
    while(y-x)>=eps:
        if f(x)*f((x+y)/2)<0:
            y=(x+y)/2
        else:
            x=(x+y)/2
    return (x,y)