parameters: (a, b)
docstring: a ** b
  
          If b is not an integer, the result will be a float or complex
          since roots are generally irrational. If b is an integer, the
          result will be rational.
docstring_summary: a ** b
docstring_tokens: a ** b
function: def __pow__(a, b):
          """a ** b
  
          If b is not an integer, the result will be a float or complex
          since roots are generally irrational. If b is an integer, the
          result will be rational.
  
          """
          if isinstance(b, numbers.Rational):
              if b.denominator == 1:
                  power = b.numerator
                  if power >= 0:
                      return Fraction(a._numerator ** power,
                                      a._denominator ** power,
                                      _normalize=False)
                  elif a._numerator >= 0:
                      return Fraction(a._denominator ** -power,
                                      a._numerator ** -power,
                                      _normalize=False)
                  else:
                      return Fraction((-a._denominator) ** -power,
                                      (-a._numerator) ** -power,
                                      _normalize=False)
              else:
                  # A fractional power will generally produce an
                  # irrational number.
                  return float(a) ** float(b)
          else:
              return float(a) ** b
function_tokens: def __pow__ ( a , b ) : if isinstance ( b , numbers . Rational ) : if b . denominator == 1 : power = b . numerator if power >= 0 : return Fraction ( a . _numerator ** power , a . _denominator ** power , _normalize = False ) elif a . _numerator >= 0 : return Fraction ( a . _denominator ** - power , a . _numerator ** - power , _normalize = False ) else : return Fraction ( ( - a . _denominator ) ** - power , ( - a . _numerator ) ** - power , _normalize = False ) else : # A fractional power will generally produce an # irrational number. return float ( a ) ** float ( b ) else : return float ( a ) ** b