Example description
/* S18DE_P0W_F C++ Header Example Program.
 *
 * Copyright 2019 Numerical Algorithms Group.
 * Mark 27, 2019.
 */

#include <nag.h>
#include <nagad.h>
#include <stdio.h>
#include <string>
#include <iostream>
using namespace std;

int main(void)
{
  int exit_status = 0;

  // Input and output variables

  cout << "S18DE_P0W_F C++ Header Example Program Results\n\n";

  Integer ifail = 0;
  void    *ad_handle = 0;

  cout << "    nu               z             scal         cy[0]\n";
  cout.setf(ios::scientific,ios::floatfield);
  cout.setf(ios::right);
  cout.precision(2);

  const Integer n = 1;
  double        fnu;
  Complex       z, cy[n];
  Integer       nz;
  fnu =  5.5;
  z.re = -6.1;
  z.im =  9.8;
  
  // Call NAG AD Routine
  ifail = 0;
  s18de_p0w_f_(ad_handle,fnu,z,n,"S",cy,nz,ifail,1);

  cout.width(10);  cout << fnu << " (";
  cout.width(9);  cout << z.re << ",";
  cout.width(10);  cout << z.im << "   S   (";
  cout.width(9);  cout << cy[0].re << ",";
  cout.width(10);  cout << cy[0].im << ")" << endl;

  return exit_status;
}