From dennis.glatting@plaintalk.bellevue.wa.us Tue Nov 26 16:46:31 1996 Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 3.3 v118.2) From: Dennis Glatting Date: Mon, 25 Nov 96 19:46:06 -0800 To: cthombor@cs.umn.edu Subject: minor patches to mrandom 3.0 Reply-To: dennis.glatting@plaintalk.bellevue.wa.us If you are still maintaining mrandom, here are some patches. -dpg *** mrandom.c~ Mon Nov 25 19:20:35 1996 --- mrandom.c Mon Nov 25 19:22:39 1996 *************** *** 235,241 **** /*************************************/ /* bfill_vector */ /* Fill a vector, with buffering, */ ! /* with a function of * /* the underlying RNG */ /*************************************/ #define bfill_vector(function) \ --- 235,241 ---- /*************************************/ /* bfill_vector */ /* Fill a vector, with buffering, */ ! /* with a function of */ /* the underlying RNG */ /*************************************/ #define bfill_vector(function) \ *** mrandom.h~ Fri May 28 12:25:37 1993 --- mrandom.h Mon Nov 25 19:26:11 1996 *************** *** 44,49 **** --- 44,53 ---- #define MRANDOM #endif + #if defined(__NeXT__) + #include + #endif + /*****************************/ /* Miscellaneous definitions */ /*****************************/ *** mrtest.c~ Mon Nov 25 19:31:14 1996 --- mrtest.c Mon Nov 25 19:32:50 1996 *************** *** 273,285 **** argerr((char*) argv[0]); } if (count1<0) { ! printf("Illegal value, %ld, for number of times "); ! printf(" to cycle rng before starting tests.\n",count1); argerr((char*) argv[0]); } if (count2<0) { ! printf("Illegal value, %ld, for number of billions of times "); ! printf(" to cycle rng before starting tests.\n",count1); argerr((char*) argv[0]); } break; --- 273,285 ---- argerr((char*) argv[0]); } if (count1<0) { ! printf("Illegal value, %ld, for number of times ",count1); ! printf(" to cycle rng before starting tests.\n"); argerr((char*) argv[0]); } if (count2<0) { ! printf("Illegal value, %ld, for number of billions of times ",count1); ! printf(" to cycle rng before starting tests.\n"); argerr((char*) argv[0]); } break; *** xsq.c~ Fri May 28 12:25:42 1993 --- xsq.c Mon Nov 25 19:30:48 1996 *************** *** 9,14 **** --- 9,15 ---- */ #include + #include #define min(x,y) ( ((x)<(y)) ? (x) : (y) ) #define max(x,y) ( ((x)>(y)) ? (x) : (y) ) *************** *** 66,72 **** * otherwise uses "%.2g". Always prints at least 2 significant digits, * never prints more than 3. */ ! print2digits(f) double f; { double a; --- 67,73 ---- * otherwise uses "%.2g". Always prints at least 2 significant digits, * never prints more than 3. */ ! void print2digits(f) double f; { double a; *************** *** 199,205 **** printf(accurate? "= " : "~ "); stddev = xsq_to_stddev(xsq,k,n,&accurate); print2digits(stddev); ! printf("\n", stddev); if (fabs(stddev) > 6.1) { printf("\n"); --- 200,206 ---- printf(accurate? "= " : "~ "); stddev = xsq_to_stddev(xsq,k,n,&accurate); print2digits(stddev); ! printf("\n"); if (fabs(stddev) > 6.1) { printf("\n");