(x)
Evaluates the hyperbolic cos of an interval
Evaluates the hyperbolic cos of an interval
Evaluates the hyperbolic cos of an interval
def cosh(x):
    """Evaluates the hyperbolic cos of an interval"""
    np = import_module('numpy')
    if isinstance(x, (int, float)):
        return interval(np.cosh(x), np.cosh(x))
    elif isinstance(x, interval):
        #both signs
        if x.start < 0 and x.end > 0:
            end = max(np.cosh(x.start), np.cosh(x.end))
            return interval(1, end, is_valid=x.is_valid)
        else:
            #Monotonic
            start = np.cosh(x.start)
            end = np.cosh(x.end)
            return interval(start, end, is_valid=x.is_valid)
    else:
        raise NotImplementedError
def cosh ( x ) : np = import_module ( 'numpy' ) if isinstance ( x , ( int , float ) ) : return interval ( np . cosh ( x ) , np . cosh ( x ) ) elif isinstance ( x , interval ) : #both signs if x . start < 0 and x . end > 0 : end = max ( np . cosh ( x . start ) , np . cosh ( x . end ) ) return interval ( 1 , end , is_valid = x . is_valid ) else : #Monotonic start = np . cosh ( x . start ) end = np . cosh ( x . end ) return interval ( start , end , is_valid = x . is_valid ) else : raise NotImplementedError