Method on @sym: signIm (z)

Return the sign of the imaginary part of a complex expression.

Examples:

signIm (sym(3) + 2i)
  ⇒ (sym) 1
signIm (3 - 1i*sym(pi))
  ⇒ (sym) -1
signIm (sym(3))
  ⇒ (sym) 0

syms x y real
signIm (x)
  ⇒ (sym) 0
signIm (x + 1i*y)
  ⇒ (sym) sign(y)

See also: @sym/imag, @sym/sign.

Package: symbolic