'Raises a to the power of b, to modulo if given.
The right-hand operand must be a whole number whose integer part (after
any exponent has been applied) has no more than 9 digits and whose
fractional part (if any) is all zeros before any rounding. The operand
may be positive, negative, or zero; if negative, the absolute value of
the power is used, and the left-hand operand is inverted (divided into
1) before use.
If the increased precision needed for the intermediate calculations
exceeds the capabilities of the implementation then an Invalid operation
condition is raised.
If, when raising to a negative power, an underflow occurs during the
division into 1, the operation is not halted at that point but
continues.
>>> ExtendedContext.power(Decimal(\'2\'), Decimal(\'3\'))
Decimal("8")
>>> ExtendedContext.power(Decimal(\'2\'), Decimal(\'-3\'))
Decimal("0.125")
>>> ExtendedContext.power(Decimal(\'1.7\'), Decimal(\'8\'))
Decimal("69.7575744")
>>> ExtendedContext.power(Decimal(\'Infinity\'), Decimal(\'-2\'))
Decimal("0")
>>> ExtendedContext.power(Decimal(\'Infinity\'), Decimal(\'-1\'))
Decimal("0")
>>> ExtendedContext.power(Decimal(\'Infinity\'), Decimal(\'0\'))
Decimal("1")
>>> ExtendedContext.power(Decimal(\'Infinity\'), Decimal(\'1\'))
Decimal("Infinity")
>>> ExtendedContext.power(Decimal(\'Infinity\'), Decimal(\'2\'))
Decimal("Infinity")
>>> ExtendedContext.power(Decimal(\'-Infinity\'), Decimal(\'-2\'))
Decimal("0")
>>> ExtendedContext.power(Decimal(\'-Infinity\'), Decimal(\'-1\'))
Decimal("-0")
>>> ExtendedContext.power(Decimal(\'-Infinity\'), Decimal(\'0\'))
Decimal("1")
>>> ExtendedContext.power(Decimal(\'-Infinity\'), Decimal(\'1\'))
Decimal("-Infinity")
>>> ExtendedContext.power(Decimal(\'-Infinity\'), Decimal(\'2\'))
Decimal("Infinity")
>>> ExtendedContext.power(Decimal(\'0\'), Decimal(\'0\'))
Decimal("NaN")'

def power(self, a, b, modulo=None):

    return a.__pow__(b, modulo, context=self)
