home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 3.ddi / N2RAND.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  1.2 KB  |  36 lines

  1. /* n2rand.h - Header file for NeuralWare Standard Random Number Generator */
  2. /* Version 1.0 of 6 March 1990 */
  3.  
  4. /* This file is required for N2RAND.C, the NeuralWare standard random number
  5.    generator. It is also required for those routines that need to know the
  6.    fineness or interval of the random number generator. */
  7.  
  8. /* In order to build the NeuralWare product or Designer Pack, this file is
  9.    included in USERMATH.H */
  10.  
  11. #ifndef N2RAND                  /* include this file only once per make     */
  12. #define N2RAND
  13.  
  14. #if 0
  15. #ifdef TEST_RAN
  16. #define SREAL float             /* required for stand-alone use */
  17. #define NINT  int
  18. #define LOCAL static
  19. #define SL    long
  20. #define UL    unsigned long
  21. #define UW    unsigned word
  22. #endif                          /* end - ifdef TEST_RAN */
  23. #endif
  24.  
  25. /* The following defines are 'Magic Numbers' from Knuth & Sedgewick         */
  26.  
  27. #define  MAXRAND         1824726041       /* "fineness" of generator        */
  28.                                           /* large prime .LT. 2^31          */ 
  29. #define  RANDINV         5.480274724e-10  /* inverse  (1.0/1824726041)      */
  30.  
  31. #define  MSEED           161803398        /* large number .LT. MBIG         */
  32. #define  MZ              0
  33.  
  34. #endif /* N2RAND */
  35.  
  36.