home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 247_02 / mirdef.h < prev    next >
Text File  |  1989-04-19  |  2KB  |  52 lines

  1. /* 
  2.  *   MIRACL definitions - mirdef.h
  3.  *   This version suitable for use with most 16-bit computers
  4.  *   e.g. IBM PC
  5.  */
  6. #define MIRACL 1
  7. #define small int
  8.                             /* smalls are usually ints, but see  *
  9.                              * bnmuldv.any                       */
  10.  
  11. #define MAXNUM  1073741824L 
  12.                             /* =2^[L-2] where L is the number    *
  13.                              * of bits in a 'long' data type     */
  14.  
  15. #define MAXBASE 16384  
  16.                             /* = 2^[W-2] where W is the number   *
  17.                              * of bits in a small and L>=2W OR   *
  18.                              * if double-small sized integer is  *
  19.                              * available at machine code level   *
  20.                              * and muldiv is written in assembly *
  21.                              * language to take advantage of it. *
  22.                              * Otherwise = 2^[(W/2)-1]           */
  23.  
  24. #define TOOBIG  16384
  25.                             /* = 2^[I-2] where I is the number   *
  26.                              * of bits in an 'int'               */
  27.  
  28. #define MSK     0xFF      
  29.                             /* 2^(W/2) - 1                       */
  30. #define BTS     8         
  31.                             /* (W/2)                             */
  32. #define WPERD   3
  33.                             /* (Bits in double mantissa)/(W-2)   */
  34. #define BIGGEST 1.0E38
  35.                             /* biggest representable double      */
  36. #define IBSIZ   132
  37.                             /* Input buffer size                 */
  38. #define OBSIZ   256        
  39.                             /* Output buffer size                */
  40.  
  41.                /* some useful definitions */
  42.  
  43. #define bool int
  44. #define forever for(;;)   
  45. #define FALSE 0
  46. #define TRUE 1
  47. #define OFF 0
  48. #define ON 1
  49. #define PLUS 1
  50. #define MINUS (-1)
  51.  
  52.