Let a, n, r, and theta be real, with theta in (-pi,pi] and r in (0, inf). Define
x = r * exp(%i * theta). Assuming the principal power function, (x^a)^n = x^(n * a) is
an identity provided n * ceiling((a * theta - %pi)/(2 * %pi)) is an integer.
Extending this to a or n complex gives the condition n * ceiling((w + conjugate(w))/(4 * %pi))
is an integer, where w = a * theta - %pi.
The periodic extension of the identity function that maps (-%pi,%pi] onto (-%pi,%pi] is the function
x in reals |--> x - 2 %pi ceiling((x- %pi)/(2 %pi)).
--Barton