home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: NAMULL */
-
- main()
-
- {
- int *fp,i,max,n;
- static float root[6]={0.,-4.,1.5,0.,0.,0.};
- float eps;
-
- n = 3;
- eps = .000001;
- max = 40;
-
- namull(root,&n,eps,max);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from NAMULL\n\n");
- printf("Test Results from NAMULL\n\n");
- fprintf(*fp," N = %d\n\n",n);
- printf( " N = %d\n\n",n);
-
- for(i = 0; i <= 5; 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]);
- }
- }
-
- value(rt,fprt)
-
- float rt[],fprt[];
- {
- static float a[4]={1.,1.,-9.,25.},
- b[4]={0.,7.,0.,5.};
- float rt0,rt1,fprt0,fprt1;
- int nd;
-
- nd = 3;
- rt0 = rt[0];
- rt1 = rt[1];
- cxpoev(rt0,rt1,nd,a,b,&fprt0,&fprt1);
- fprt[0] = fprt0;
- fprt[1] = fprt1;
- }
-