NAG Library Manual, Mark 30.3
Interfaces:  FL   CL   CPP   AD 

NAG CL Interface Introduction
Example description

nag_complex_create (a02bac) Example Program Results
                                 x, y =   2.0000, -3.0000
  nag_complex_create   : z =    (x,y) = ( 2.0000, -3.0000)
  nag_complex_real     :      real(z) =   2.0000
  nag_complex_imag     :      imag(z) =  -3.0000
  nag_complex_create   :            v = ( 3.0000,  1.2500)
  nag_complex_create   :            w = ( 2.5000, -1.7500)
  nag_complex_add      : z =      v+w = ( 5.5000, -0.5000)
  nag_complex_subtract : z =      v-w = ( 0.5000,  3.0000)
  nag_complex_multiply : z =      v*w = ( 9.6875, -2.1250)
  nag_complex_divide   : z =      v/w = ( 0.5705,  0.8993)
  nag_complex_negate   : z =       -w = (-2.5000,  1.7500)
  nag_complex_conjg    : z = conjg(w) = ( 2.5000,  1.7500)
  nag_complex_equal    : v != w
  nag_complex_not_equal: w != z

  nag_complex_arg      :       arg(z) =   0.6107
  nag_complex_abs      : r =   abs(z) =   3.0516
  nag_complex_sqrt     : v =  sqrt(z) = ( 1.6661,  0.5252)
  nag_complex_i_power  : v =     z**3 = (-7.3438, 27.4531)
  nag_complex_r_power  : v =   z**2.5 = ( 0.7153, 16.2522)
  nag_complex_c_power  : v =     z**w = (43.1428,-19.5581)
  nag_complex_log      : v =   log(z) = ( 1.1157,  0.6107)
  nag_complex_exp      : z =   exp(v) = ( 2.5000,  1.7500)
  nag_complex_sin      : v =   sin(z) = ( 1.7740, -2.2355)
  nag_complex_cos      : v =   cos(z) = (-2.3747, -1.6700)
  nag_complex_tan      : v =   tan(z) = (-0.0569,  0.9814)
  nag_complex_divide   :sin(z)/cos(z) = (-0.0569,  0.9814)