3.5.1.4.16 ImProduct

Description

Perform the product (multiplication) operation of two complexes.

ImProduct(x1+i*y1, x2+i*y2)=(x1*x2-y1*y2)+i*(x1*y2+x2*y1)

Syntax

complex ImProduct(complex cY1, complex cY2)

Parameters

cY1

The multiplicand.

cY2

The multiplier.

Return

Return the product of two complexes.

Example

imProduct(3+4i, 1+2i) = ;  // -5+10i
 
complex c1 = 1+1i;
complex c2 = 4+1i;
complex c3;
c3 = imProduct(c1, c2);
c3 = ;  // 3+5i

See Also

ImDiv