a02 Chapter Contents
a02 Chapter Introduction (PDF version)
NAG C Library Manual

NAG Library Chapter Introduction

a02 – Complex Arithmetic

+ Contents

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.2.1.1 in the Essential Introduction 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) nag_complex_abs (a02dbc)
    addition nag_complex_add (a02cac)
    arg(z) nag_complex_arg (a02dac)
    comparison, 
        equality nag_complex_equal (a02cgc)
        inequality nag_complex_not_equal (a02chc)
    complex power nag_complex_c_power (a02dfc)
    conjugate nag_complex_conjg (a02cfc)
    cos(z) nag_complex_cos (a02dkc)
    division nag_complex_divide (a02cdc)
    exp(z) nag_complex_exp (a02dhc)
    imaginary part nag_complex_imag (a02bcc)
    integer power nag_complex_i_power (a02ddc)
    log(z) nag_complex_log (a02dgc)
    multiplication nag_complex_multiply (a02ccc)
    negation nag_complex_negate (a02cec)
    real and imaginary parts nag_complex (a02bac)
    real part nag_complex_real (a02bbc)
    real power nag_complex_r_power (a02dec)
    sin(z) nag_complex_sin (a02djc)
    sqrt(z) nag_complex_sqrt (a02dcc)
    subtraction nag_complex_subtract (a02cbc)
    tan(z) nag_complex_tan (a02dlc)

4  Functions Withdrawn or Scheduled for Withdrawal

None.

a02 Chapter Contents
a02 Chapter Introduction (PDF version)
NAG C Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012