home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: STANVB */
-
- main()
-
- {
- int *fp,i,lcx,lcn,nb,nt,nr,ntb;
- static int n[16]={1,0,1,1,
- 0,1,1,1,
- 1,1,1,0,
- 1,1,0,1};
-
- float av[13],f,g[4];
- static float x[16]={2., 0.,20., 7.,
- 0.,32.,14., 3.,
- 4.,13.,31., 0.,
- 0.,23., 0.,11.};
-
- lcx = 4;
- lcn = 4;
- nb = 4;
- nt = 4;
- nr = 3;
- ntb = 3;
-
- stanvb(lcx,lcn,nb,nt,ntb,nr,n,x,&f,av,g);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from STANVB\n");
- printf("Test Results from STANVB\n\n");
-
- fprintf(*fp," F = %f\n\n",f);
- printf( " F = %f\n\n",f);
-
- for(i = 0; i <= 12; i++)
- {
- fprintf(*fp,"av[%d] = %15.7f\n",i,av[i]);
- printf( "av[%d] = %15.7f\n",i,av[i]);
- }
- }
-