cudd  3.0.0
The University of Colorado Decision Diagram Package
epdInt.h
Go to the documentation of this file.
1 
47 #ifndef EPD_INT_H_
48 #define EPD_INT_H_
49 
50 #include "config.h"
51 #include "epd.h"
52 
53 #if WORDS_BIGENDIAN == 1
54 #define EPD_BIG_ENDIAN
55 #endif
56 
57 /*---------------------------------------------------------------------------*/
58 /* Constant declarations */
59 /*---------------------------------------------------------------------------*/
60 
61 #define EPD_MAX_BIN 1023
62 #define EPD_MAX_DEC 308
63 #define EPD_EXP_INF 0x7ff
64 
65 /*---------------------------------------------------------------------------*/
66 /* Type declarations */
67 /*---------------------------------------------------------------------------*/
68 
69 typedef struct IeeeDoubleStruct IeeeDouble;
70 typedef struct IeeeNanStruct IeeeNan;
71 typedef union EpTypeUnion EpType;
72 
73 /*---------------------------------------------------------------------------*/
74 /* Structure declarations */
75 /*---------------------------------------------------------------------------*/
76 
80 #ifdef EPD_BIG_ENDIAN
81 struct IeeeDoubleStruct { /* BIG_ENDIAN */
82  unsigned int sign: 1;
83  unsigned int exponent: 11;
84  unsigned int mantissa0: 20;
85  unsigned int mantissa1: 32;
86 };
87 #else
88 struct IeeeDoubleStruct { /* LITTLE_ENDIAN */
89  unsigned int mantissa1: 32;
90  unsigned int mantissa0: 20;
91  unsigned int exponent: 11;
92  unsigned int sign: 1;
93 };
94 #endif
95 
99 #ifdef EPD_BIG_ENDIAN
100 struct IeeeNanStruct { /* BIG_ENDIAN */
101  unsigned int sign: 1;
102  unsigned int exponent: 11;
103  unsigned int quiet_bit: 1;
104  unsigned int mantissa0: 19;
105  unsigned int mantissa1: 32;
106 };
107 #else
108 struct IeeeNanStruct { /* LITTLE_ENDIAN */
109  unsigned int mantissa1: 32;
110  unsigned int mantissa0: 19;
111  unsigned int quiet_bit: 1;
112  unsigned int exponent: 11;
113  unsigned int sign: 1;
114 };
115 #endif
116 
120 union EpTypeUnion {
121  double value;
122  struct IeeeDoubleStruct bits;
123  struct IeeeNanStruct nan;
124 };
125 
130  union EpTypeUnion type;
131  int exponent;
132 };
133 
134 /*---------------------------------------------------------------------------*/
135 /* Function prototypes */
136 /*---------------------------------------------------------------------------*/
137 
138 #ifdef __cplusplus
139 extern "C" {
140 #endif
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* EPD_H_ */
IEEE double struct.
Definition: epdInt.h:88
Different views of a double.
Definition: epdInt.h:120
Extended precision double to keep very large value.
Definition: epdInt.h:129
The University of Colorado extended double precision package.
IEEE double NaN struct.
Definition: epdInt.h:108