The functions provided in this chapter perform basic complex arithmetic operations, taking precautions to avoid unnecessary overflow or underflow in intermediate results.
See
Section 2.3.1.1 in How to Use the NAG Library and its Documentation for details of how complex numbers are represented in the NAG C Library.
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)
None.
None.