def METHOD_NAME(f, args, a, b, c, fa, fb):
    tol = float_info_epsilon * 2
    if (b - a) < 2 * tol * a:
        c = a + (b - a) / 2
    elif c <= a + abs(a) * tol:
        c = a + abs(a) * tol
    elif c >= b - abs(b) * tol:
        c = b - abs(a) * tol
    fc = f(c, *args)
    if fc == 0:
        a = c
        fa = 0
        d = 0
        fd = 0
    else:
        if fa * fc < 0:
            d = b
            fd = fb
            b = c
            fb = fc
        else:
            d = a
            fd = fa
            a = c
            fa = fc
    return a, b, fa, fb, d, fd