(x)
Evaluates the floor of an interval
Evaluates the floor of an interval
Evaluates the floor of an interval
def floor(x):
    """Evaluates the floor of an interval"""
    np = import_module('numpy')
    if isinstance(x, (int, float)):
        return interval(np.floor(x))
    elif isinstance(x, interval):
        if x.is_valid is False:
            return interval(-np.inf, np.inf, is_valid=False)
        else:
            start = np.floor(x.start)
            end = np.floor(x.end)
            #continuous over the argument
            if start == end:
                return interval(start, end, is_valid=x.is_valid)
            else:
                #not continuous over the interval
                return interval(start, end, is_valid=None)
    else:
        return NotImplementedError
def floor ( x ) : np = import_module ( 'numpy' ) if isinstance ( x , ( int , float ) ) : return interval ( np . floor ( x ) ) elif isinstance ( x , interval ) : if x . is_valid is False : return interval ( - np . inf , np . inf , is_valid = False ) else : start = np . floor ( x . start ) end = np . floor ( x . end ) #continuous over the argument if start == end : return interval ( start , end , is_valid = x . is_valid ) else : #not continuous over the interval return interval ( start , end , is_valid = None ) else : return NotImplementedError