(e)
return bottom_up(e, f)
Replace all hyperbolic functions with trig functions using
    the Osborne rule.

    References
    ==========

    http://en.wikipedia.org/wiki/Hyperbolic_function
Replace all hyperbolic functions with trig functions using
    the Osborne rule.
Replace all hyperbolic functions with trig functions using the Osborne rule .
def _osborne(e):
    """Replace all hyperbolic functions with trig functions using
    the Osborne rule.

    References
    ==========

    http://en.wikipedia.org/wiki/Hyperbolic_function
    """

    def f(rv):
        if not isinstance(rv, C.HyperbolicFunction):
            return rv
        if rv.func is sinh:
            return I*sin(rv.args[0])
        elif rv.func is cosh:
            return cos(rv.args[0])
        elif rv.func is tanh:
            return I*tan(rv.args[0])
        elif rv.func is coth:
            return cot(rv.args[0])/I
        else:
            raise NotImplementedError('unhandled %s' % rv.func)

    return bottom_up(e, f)
def _osborne ( e ) : def f ( rv ) : if not isinstance ( rv , C . HyperbolicFunction ) : return rv if rv . func is sinh : return I * sin ( rv . args [ 0 ] ) elif rv . func is cosh : return cos ( rv . args [ 0 ] ) elif rv . func is tanh : return I * tan ( rv . args [ 0 ] ) elif rv . func is coth : return cot ( rv . args [ 0 ] ) / I else : raise NotImplementedError ( 'unhandled %s' % rv . func ) return bottom_up ( e , f )