'Compute isolating intervals for roots of ``f``.'

def intervals(f, all=False, eps=None, inf=None, sup=None, fast=False, sqf=False):

    if (not f.lev):
        if (not all):
            if (not sqf):
                return dup_isolate_real_roots(f.rep, f.dom, eps=eps, inf=inf, sup=sup, fast=fast)
            else:
                return dup_isolate_real_roots_sqf(f.rep, f.dom, eps=eps, inf=inf, sup=sup, fast=fast)
        elif (not sqf):
            return dup_isolate_all_roots(f.rep, f.dom, eps=eps, inf=inf, sup=sup, fast=fast)
        else:
            return dup_isolate_all_roots_sqf(f.rep, f.dom, eps=eps, inf=inf, sup=sup, fast=fast)
    else:
        raise PolynomialError("can't    isolate    roots    of    a    multivariate    polynomial")
