complex
a number with a real and an imaginary part
1# a number then i23 + 4iExample outputCtrl+Enter to run
syntax
Section titled “syntax”1# arithmetic works as usual2(1 + 2i) * (3 - 1i)5 + 5iExample outputCtrl+Enter to run
Functions that take it
Section titled “Functions that take it”sqrtsquare rootabsthe value without its sign, so -3 becomes 3expe (2.718…) to the power xlnnatural logarithm, the log base erethe real partimthe imaginary part, as a plain numberconjthe complex conjugate: the same number with its imaginary part negatedargthe angle from the positive real axis to the number, as an angle unitcsqrtsquare root that gives a complex number for negatives, so csqrt(-4) is 2icrootsall n complex nth roots of a number, as a listpolarmake a complex number from its polar form, or with one argument show z in that form
Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.