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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  PLYDIF */
  4.  
  5.         main()
  6.  
  7.         {
  8.         int *fp,nd;
  9.         static float a[5]={1.,0.,2.,-1.,1.};
  10.         float x,ans;
  11.  
  12.         nd = 4;
  13.         x = 1.;
  14.  
  15.         plydif(a,nd,x,&ans);
  16.  
  17.  
  18.         *fp=fopen("PRN:","w");                 /* open the printer */
  19.  
  20.         fprintf(*fp,"Test Results from PLYDIF\n\n");
  21.          printf("Test Results from PLYDIF\n\n");
  22.  
  23.         fprintf(*fp," ANS = %18.9f\n\n",ans);
  24.          printf(" ANS = %18.9f\n\n",ans);
  25.  
  26.         }
  27.  
  28.