Countdown: 5

Some of the math capabilities with complex numbers in World:

w> z: 3+4i
== 3+4i
w> type? z
== complex!
w> z/Re        ; or z/re or z/1
== 3.0
w> z/Im        ; or z/im or z/2
== 4.0
w> abs z
== 5.0
w> arg z
== 0.927295218001612
w> z * z
== -7+24i
w> sqrt z
== 2+i
w> cos z
== -27.03494560307422-3.851153334811777i
w> ln z
== 1.6094379124341+0.927295218001612i
w> e ** z
== -13.12878308146216-15.20078446306795i
w> i: 1i
== 1i
w> e ** (i * pi) + 1                  ; Euler's identity
== 1.224646799147353e-16i    ; Rounding please!
w> first e ** (i * pi) + 1
== 0.0
w> round/to abs e ** (i * pi) + 1 1e-15
== 0.0

It's ok to put in some parentheses for readability:

w> round/to (abs (e ** (i * pi) + 1)) 1e-15
== 0.0

Some may prefer a caret (^) as the power operator, and that can be defined:

w> ^: :**
w> 0+1i ^ 0
== 1+0i

What does the next two lines do?

f: func[c][z: 0i n: 0 while[999 > next 'n][if 4 < abs z: z * z + c[return n]]]
for y -59 18 1[for x -39 38 1[prin either f x * 1i + y / 40[" "]['*]]prin lf]