home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: STANVG */
-
- main()
-
- {
-
- static float x[16] = {24., 47., 35., 42.,
- 47., 85., 23., 47.,
- 65., 49., 23., 62.,
- 12., 14., 19., 23.},
- mt[16] = {1, 2, 3, 4,
- 4, 1, 2, 3,
- 3, 4, 1, 2,
- 2, 3, 4, 1},
- mg[16] = {4, 3, 2, 1,
- 3, 2, 1, 4,
- 2, 1, 4, 3,
- 1, 4, 3, 2};
- float av[23],t[4];
- int *fp,lcx,lcmt,lcmg,n,i;
-
- *fp=fopen("PRN:","w"); /* open the printer */
- fprintf(*fp,"Test Results from STANVG\n\n");
- printf("Test Results from STANVG\n\n");
-
- lcx = 4;
- lcmt = 4;
- lcmg = 4;
- n = 4;
-
- STANVG(lcx,lcmt,lcmg,n,mt,mg,x,av,t);
-
- for (i = 0; i <= 22; i++)
- {
- fprintf(*fp,"av[%d] = %15.7f\n",i,av[i]);
- printf("av[%d] = %15.7f\n",i,av[i]);
- }
- }