home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: PLYDIV */
-
- main()
-
- {
- int *fp,i,ndp,nds,ndq,ndr;
- static float p[8]={1.,0.,3.,-2.,0.,0.,-1.,1.},
- s[4]={1.,2.,0.,-1.};
- float q[8],r[8];
-
- ndp = 7;
- nds = 3;
-
- plydiv(p,s,ndp,nds,q,r,&ndq,&ndr);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from PLYDIV\n\n");
- printf("Test Results from PLYDIV\n\n");
-
- fprintf(*fp," NDQ: %3d NDR: %3d\n",ndq,ndr);
- printf(" NDQ: %3d NDR: %3d\n",ndq,ndr);
-
- for(i = 0; i <= ndq; i++)
- {
- fprintf(*fp,"%9.5f\n",q[i]);
- printf("%9.5f\n",q[i]);
- }
-
- for(i = 0; i <= ndr; i++)
- {
- fprintf(*fp,"%9.5f\n",r[i]);
- printf("%9.5f\n",r[i]);
- }
- }