(x)
Evaluates the inverse hyperbolic cosine of an interval
Evaluates the inverse hyperbolic cosine of an interval
Evaluates the inverse hyperbolic cosine of an interval
def acosh(x):
    """Evaluates the inverse hyperbolic cosine of an interval"""
    np = import_module('numpy')
    if isinstance(x, (int, float)):
        #Outside the domain
        if x < 1:
            return interval(-np.inf, np.inf, is_valid=False)
        else:
            return interval(np.arccosh(x))
    elif isinstance(x, interval):
        #Outside the domain
        if x.end < 1:
            return interval(-np.inf, np.inf, is_valid=False)
        #Partly outside the domain
        elif x.start < 1:
            return interval(-np.inf, np.inf, is_valid=None)
        else:
            start = np.arccosh(x.start)
            end = np.arccosh(x.end)
            return interval(start, end, is_valid=x.is_valid)
    else:
        return NotImplementedError
def acosh ( x ) : np = import_module ( 'numpy' ) if isinstance ( x , ( int , float ) ) : #Outside the domain if x < 1 : return interval ( - np . inf , np . inf , is_valid = False ) else : return interval ( np . arccosh ( x ) ) elif isinstance ( x , interval ) : #Outside the domain if x . end < 1 : return interval ( - np . inf , np . inf , is_valid = False ) #Partly outside the domain elif x . start < 1 : return interval ( - np . inf , np . inf , is_valid = None ) else : start = np . arccosh ( x . start ) end = np . arccosh ( x . end ) return interval ( start , end , is_valid = x . is_valid ) else : return NotImplementedError