Imaginary part of complex numbers is ignored

Here, two complex numbers are compared using the <, <=, > or >= operators. However, you can only test if complex numbers are equal or not equal. There is no way to tell if one complex number is larger or smaller than another. Example:

z = (3,0)
c = (2,1)
if z > c
  ...

When looking at the real parts, one would say that z is larger than c. However, when looking at the imaginary parts, c appears larger than z. Therefore the <, <=, > and >= operators are undefined with complex numbers. Ultra Fractal looks only at the real parts of complex numbers when these operators are used.

To avoid this warning, you should either explicitly compare the real parts of the complex numbers:

if real(z) > real(c)
  ...

or compare the magnitude of the complex numbers using the |...| (modulus squared) operator if you want to take into account both the real and the imaginary parts. The result of |z| is equal to sqr(real(z)) + sqr(imag(z)).

if |z| > |c|
  ...

See Also
Warnings