'Returns this with a positive exponent as a 2-tuple (a fraction).
Examples
>>> from sympy.functions import exp
>>> from sympy.abc import x
>>> exp(-x).as_numer_denom()
(1, exp(x))
>>> exp(x).as_numer_denom()
(exp(x), 1)'

def as_numer_denom(self):

    exp = self.exp
    neg_exp = exp.is_negative
    if ((not neg_exp) and (not (- exp).is_negative)):
        neg_exp = _coeff_isneg(exp)
    if neg_exp:
        return (S.One, self.func((- exp)))
    return (self, S.One)
