(x)
Evaluates the inverse sine of an interval
Evaluates the inverse sine of an interval
Evaluates the inverse sine of an interval
def asin(x):
    """Evaluates the inverse sine of an interval"""
    np = import_module('numpy')
    if isinstance(x, (int, float)):
        #Outside the domain
        if abs(x) > 1:
            return interval(-np.inf, np.inf, is_valid=False)
        else:
            return interval(np.arcsin(x), np.arcsin(x))
    elif isinstance(x, interval):
        #Outside the domain
        if x.is_valid is False or x.start > 1 or x.end < -1:
            return interval(-np.inf, np.inf, is_valid=False)
        #Partially outside the domain
        elif x.start < -1 or x.end > 1:
            return interval(-np.inf, np.inf, is_valid=None)
        else:
            start = np.arcsin(x.start)
            end = np.arcsin(x.end)
            return interval(start, end, is_valid=x.is_valid)
def asin ( x ) : np = import_module ( 'numpy' ) if isinstance ( x , ( int , float ) ) : #Outside the domain if abs ( x ) > 1 : return interval ( - np . inf , np . inf , is_valid = False ) else : return interval ( np . arcsin ( x ) , np . arcsin ( x ) ) elif isinstance ( x , interval ) : #Outside the domain if x . is_valid is False or x . start > 1 or x . end < - 1 : return interval ( - np . inf , np . inf , is_valid = False ) #Partially outside the domain elif x . start < - 1 or x . end > 1 : return interval ( - np . inf , np . inf , is_valid = None ) else : start = np . arcsin ( x . start ) end = np . arcsin ( x . end ) return interval ( start , end , is_valid = x . is_valid )