Complex numbers can be represented as a vector where the X is the real value and the Y is the complex value. We can then get the angle of the vector and convert it to hue, and then set the darkness so it makes a line every integer power of 2 (including negative integers). This is how the output of the function is displayed, with the input being the coordinates of each pixel from the center.
vec2 z = z.x + z.y*i
mult(vec2, vec2) = a*b
div(vec2 a, vec2 b) = a/b
(note vec2*vec2 and vec2/vec2 do not work the
same because GLSL does not handle vectors as
complex numbers).
cPow(vec2 a, vec2 b) = a^b
ePow(vec2 z) = e^z
ln(vec2 z) = ln(z)
cSin(vec2 z) = sin(z)
tet(vec2 z, int x) = z^^x