1: /* Copyright (c) 1979 Regents of the University of California */
   2: 
   3: static char sccsid[] = "@(#)RANDOM.c 1.4 1/10/83";
   4: 
   5: #include "h00vars.h"
   6: 
   7: extern long RAND();
   8: 
   9: double
  10: RANDOM()
  11: {
  12:     double d;
  13:     long l;
  14: 
  15:     /*
  16: 	 * calculate (1103515245 * seed) mod 2^31-1
  17: 	 */
  18:     d = 1103515245.0 * _seed / 2147483647.0;
  19:     l = d;
  20:     d = d - l;
  21:     _seed = d * 2147483647.0;
  22:     /*
  23: 	 * want a value in the range 0..1
  24: 	 */
  25:     return(d);
  26: }

Defined functions

RANDOM defined in line 9; used 2 times

Defined variables

sccsid defined in line 3; never used
Last modified: 1983-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 864
Valid CSS Valid XHTML 1.0 Strict