home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: SIMSEC */
-
- main()
-
- {
- int *fp,numrt;
- static float a[6]={2.,5.,2.,1.,0.,-1.},
- b[6]={1.,3.,2.,0.,-3.,1.};
- float x[3],y[3],tol;
-
- tol = .001;
-
- simsec(a,b,x,y,tol,&numrt);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from SIMSEC\n\n");
- printf("Test Results from SIMSEC\n\n");
-
- fprintf(*fp," NUMRT = %d\n\n",numrt);
- printf(" NUMRT = %d\n\n",numrt);
-
- fprintf(*fp,"ROOTS REAL IMAGINARY\n");
- printf("ROOTS REAL IMAGINARY\n");
- fprintf(*fp," %15.7f %15.7f\n",x[0],y[0]);
- printf(" %15.7f %15.7f\n",x[0],y[0]);
- fprintf(*fp," %15.7f %15.7f\n",x[1],y[1]);
- printf(" %15.7f %15.7f\n",x[1],y[1]);
- fprintf(*fp," %15.7f %15.7f\n",x[2],y[2]);
- printf(" %15.7f %15.7f\n",x[2],y[2]);
- }
-