- raise OperationError(space.w_ValueError,
- space.wrap("negative number cannot be "
- "raised to a fractional power"))
+ # Negative numbers raised to fractional powers become
+ return space.pow(space.newcomplex(x, 0.0),
+ space.newcomplex(y, 0.0),
# y is an exact integer, albeit perhaps a very large one.
# Replace x by its absolute value and remember to negate the
# pow result if y is odd.