(±1)^-n should not throw a DomainError

Since this has an integer result, no need to throw an exception.
Comparing `x == 1` should suffice here. If you want to make the comparison is between like types, it may make sense to construct `u = one(x)` only once and then also return that instance since this is faster for numeric types that do actually require allocation (e.g. `BigInt`, `BigFloat`, etc.). However, it seems like not constructing this object at all would be better in such cases.