home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: NABAIR */
-
- main()
-
- {
- int *fp,i,n,itag;
- static float a[6]={5.,-85.,620.,-2540.,5175.,-4375.};
- float b[5],c[5],eps,p1,q1,root[10];
-
- n = 5;
- p1 = 0.;
- q1 = 0.;
- itag = 50;
- eps = .0001;
-
- nabair(p1,q1,a,&itag,&n,eps,root,b,c);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from NABAIR\n\n");
- printf("Test Results from NABAIR\n\n");
-
- fprintf(*fp," ITAG = %d N = %d\n\n",itag,n);
- printf( " ITAG = %d N = %d\n\n",itag,n);
-
- fprintf(*fp,"ROOTS REAL IMAGINARY\n");
- printf("ROOTS REAL IMAGINARY\n");
- for(i = 0; i<= 9; i+=2)
- {
- fprintf(*fp," %15.7f %15.7f\n",root[i],root[i+1]);
- printf(" %15.7f %15.7f\n",root[i],root[i+1]);
- }
-
- }
-