NAG CL Interface
A02 (Complex)
Complex Arithmetic

Settings help

CL Name Style:

1 Scope of the Chapter

The functions provided in this chapter perform basic complex arithmetic operations, taking precautions to avoid unnecessary overflow or underflow in intermediate results.
See Section 3.1.1 in the Introduction to the NAG Library CL Interface for details of how complex numbers are represented in the NAG C Library.

2 Function Return Types and Argument Lists

Complex nag_complex(double x, double y)
double nag_complex_real(Complex z)
double nag_complex_imag(Complex z)
Complex nag_complex_add(Complex z1, Complex z2)
Complex nag_complex_subtract(Complex z1, Complex z2)
Complex nag_complex_multiply(Complex z1, Complex z2)
Complex nag_complex_divide(Complex z1, Complex z2)
Complex nag_complex_negate(Complex z)
Complex nag_complex_conjg(Complex z)
Boolean nag_complex_equal(Complex z1, Complex z2)
Boolean nag_complex_not_equal(Complex z1, Complex z2)
double nag_complex_arg(Complex z)
double nag_complex_abs(Complex z)
Complex nag_complex_sqrt(Complex z)
Complex nag_complex_i_power(Complex z, Integer i)
Complex nag_complex_r_power(Complex z1, double z2)
Complex nag_complex_c_power(Complex z1, Complex z2)
Complex nag_complex_log(Complex z)
Complex nag_complex_exp(Complex z)
Complex nag_complex_sin(Complex z)
Complex nag_complex_cos(Complex z)
Complex nag_complex_tan(Complex z)

3 Functionality Index

Complex numbers,  
abs(z)   a02dbc
addition   a02cac
arg(z)   a02dac
equality   a02cgc
inequality   a02chc
complex power   a02dfc
conjugate   a02cfc
cos(z)   a02dkc
division   a02cdc
exp(z)   a02dhc
imaginary part   a02bcc
integer power   a02ddc
log(z)   a02dgc
multiplication   a02ccc
negation   a02cec
real and imaginary parts   a02bac
real part   a02bbc
real power   a02dec
sin(z)   a02djc
sqrt(z)   a02dcc
subtraction   a02cbc
tan(z)   a02dlc

4 Auxiliary Functions Associated with Library Function Arguments


5 Withdrawn or Deprecated Functions