Microsoft KB Archive/87704

= Microsoft Knowledge Base =

Excel: ATP Definition: IMSUM, IMSUB
Last reviewed: April 17, 1996

Article ID: Q87704

The information in this article applies to:


 * Microsoft Excel for Windows 95, version 7.0
 * Microsoft Excel for Windows, versions 4.0, 5.0
 * Microsoft Excel for the Macintosh, versions 4.0, 5.0

SUMMARY
The versions of Microsoft Excel listed above provide a set of special analysis tools called the Analysis ToolPak. This article is part of a series of articles that provide information on the underlying formulas used in the Analysis ToolPak.

This articles covers the following functions:

IMSUM, (Complex Number Addition). IMSUB, (Complex Number Subtraction).

MORE INFORMATION
The C routine used to calculate IMSUM is:

typedef struct FCOMPLEX {float r,i;} fcomplex;
 * 1) include 

fcomplex Cadd(a,b) fcomplex a,b; {

fcomplex c;       c.r=a.r+b.r;        c.i=a.i+b.i;        return c; } The C routine used to calculate IMSUB is:

typedef struct FCOMPLEX {float r,i;} fcomplex;
 * 1) include 

fcomplex Csub(a,b) fcomplex a,b; {

fcomplex c;       c.r=a.r-b.r;        c.i=a.i-b.i;        return c; }