logical function is_real(z)
complex z

is_real =aimag(z) ==0
end
