# CxAdd

AnalysisLibErrType CxAdd (double xReal, double xImg, double yReal, double yImg, double *zReal, double *zImg);

## Purpose

Adds two complex numbers, x and y. CxAdd obtains the resulting complex number, z, using the following formulas:

zReal = xReal + yReal

zImg = xImg + yImg

## Parameters

Input
Name | Type | Description
xReal | double-precision | Real part of the first complex number to add. Default Value: 0.0
xImg | double-precision | Imaginary part of the first complex number to add. Default Value: 0.0
yReal | double-precision | Real part of the second complex number to add. Default Value: 0.0
yImg | double-precision | Imaginary part of the second complex number to add. Default Value: 0.0
Output
Name | Type | Description
zReal | double-precision pointer | Real part of the result of the complex addition.
zImg | double-precision pointer | Imaginary part of the result of the complex addition.

## Return Value

Name | Type | Description
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.