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

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