home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-SSP.ARJ / CXEXPN.C < prev    next >
Encoding:
Text File  |  1984-08-08  |  312 b   |  17 lines

  1.    cxexpn(a,r)
  2.  
  3.       /*  subroutine evaluates the exponential of a */
  4.       /*  complex argument                          */
  5.  
  6.       float a[],r[];
  7.  
  8.     {
  9.       double b;
  10.       extern double exp(),sin(),cos();
  11.  
  12.       b = exp(a[0]);
  13.       r[0] = b * cos(a[1]);
  14.       r[1] = b * sin(a[1]);
  15.     }
  16.  
  17.