home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: NAREGU */
-
- main()
-
- {
- int *fp,n;
- float eps,root,xlow,xhi;
-
- xlow = -1.;
- xhi = 0.;
- eps = .0001;
- n = 1000;
-
- naregu(xlow,xhi,eps,&root,&n);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from NAREGU\n\n");
- printf("Test Results from NAREGU\n\n");
-
- fprintf(*fp," ROOT = %15.7f N = %d\n\n",root,n);
- printf( " ROOT = %15.7f N = %d\n\n",root,n);
-
- }
-
- value(x,fx)
-
- float x,*fx;
- {
- extern double pow();
-
- *fx = x*x*x*x - (3*x*x*x) - (2*x*x) + (5*x) +1;
-
- }
-