home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: PLYADD */
-
- main()
-
- {
- int *fp,i,nda,ndb,ndc;
- static float a[7]={1.,2.,3.,4.,5.,6.,7.},
- b[7]={1.,3.,5.,7.,9.,0.,0.};
- float c[7];
-
- nda = 6;
- ndb = 4;
-
- plyadd(a,nda,b,ndb,c,&ndc);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from PLYADD\n\n");
- printf("Test Results from PLYADD\n\n");
-
- fprintf(*fp," NDC: %6.3d\n",ndc);
- printf(" NDC: %6.3d\n",ndc);
-
- for(i = 0; i <= 6; i++)
- {
- fprintf(*fp,"%9.5f\n",c[i]);
- printf("%9.5f\n",c[i]);
- }
- }