(Showing Draft Content)

Complex Numbers

Many of the engineering functions involve complex numbers. A complex number consists of two parts, a real part, and an imaginary part. Consider a complex number as being a point (x,y) in a plane. The real number is similar to a point (x,0) on the x-axis of the plane. Note that real numbers are a subset of complex numbers with zero for the coefficient of the imaginary part.

There is not a complex number data type. Instead, complex numbers are represented using strings of the form "x+yi" where x and y are real numbers and x is the real part and "yi" is the imaginary part. For example:



The following table discusses some cases when working with complex numbers:



If either the real part or the imaginary part is zero, then the zero parts can be optionally omitted from the text representation.

"3" is equivalent to "3+0i"

"4i" is equivalent to "0+4i"

Real numbers are a subset of complex numbers so a real number can be used in place of a string of the form "x+yi".

3 is equivalent to "3+0i"

The functions that return a complex number return a string of the form "x+yi".

COMPLEX(3,5) returns "3+5i"

The functions that accept a complex number can accept either a number or a string of the form "x+yi".

IMSUM("1+2i", "3+4i") returns "4+6i"

IMSUM(1, 3) returns "4"

When a string cannot be converted to a number Spread returns a #VALUE error.

COS("abc") returns #VALUE!

IMCOS("abc") returns #VALUE!

Either suffix "j" or the suffix "i" can denote the imaginary part.

"3+4j" is equivalent to "3+4i"

A given formula always returns the "i" suffix irrespective of the suffix used.

IMSUM("1+2i","3+4i") returns "4+6i"

IMSUM("1+2j","3+4j") returns "4+6i"

IMSUM("1+2i","3+4j") returns "4+6i"

Spaces before the real part or before the imaginary part are not allowed.

IMABS("3+4i") returns 5

IMABS(" 3+4i") returns #VALUE!

IMABS("3 +4i") returns #VALUE!

IMABS("3+4i ") returns #VALUE!