def _bisect_interval(a, b, fa, fb):
    """Conditional checks for intervals in methods involving bisection"""
    if fa*fb > 0:
        raise ValueError("f(a) and f(b) must have different signs")
    root = 0.0
    status = _ECONVERR

    # Root found at either end of [a,b]
    if fa == 0:
        root = a
        status = _ECONVERGED
    if fb == 0:
        root = b
        status = _ECONVERGED

    return root, status
Conditional checks for intervals in methods involving bisection