home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: STPLRG */
-
- main()
-
- {
- int *fp,i,iflag,m,n;
-
- float a[20],c[4];
- static float x[11]={1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.},
- y[11]={-2.,7.,34.,91.,190.,343.,562.,859.,
- 1246.,1735.,2338.};
-
- m = 11;
- n = 3;
-
- stplrg(m,x,y,n,c,&iflag,a);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from STPLRG\n");
- printf("Test Results from STPLRG\n\n");
-
- fprintf(*fp," IFLAG = %d\n\n",iflag);
- printf( " IFLAG = %d\n\n",iflag);
-
- for(i = 0; i <= 3; i++)
- {
- fprintf(*fp,"c[%d] = %f\n",i,c[i]);
- printf( "c[%d] = %f\n",i,c[i]);
- }
- }
-