Rev 734 | Rev 857 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 734 | Rev 804 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | 35 | ||
36 | struct { |
36 | struct { |
37 | #ifdef __BIG_ENDIAN__ |
37 | #ifdef __BIG_ENDIAN__ |
38 | __u32 sign:1; |
38 | __u32 sign:1; |
39 | __u32 exp:8; |
39 | __u32 exp:8; |
40 | __u32 mantisa:23; |
40 | __u32 fraction:23; |
41 | #elif defined __LITTLE_ENDIAN__ |
41 | #elif defined __LITTLE_ENDIAN__ |
42 | __u32 mantisa:23; |
42 | __u32 fraction:23; |
43 | __u32 exp:8; |
43 | __u32 exp:8; |
44 | __u32 sign:1; |
44 | __u32 sign:1; |
45 | #else |
45 | #else |
46 | #error "Unknown endians." |
46 | #error "Unknown endians." |
47 | #endif |
47 | #endif |
Line 54... | Line 54... | ||
54 | 54 | ||
55 | struct { |
55 | struct { |
56 | #ifdef __BIG_ENDIAN__ |
56 | #ifdef __BIG_ENDIAN__ |
57 | __u64 sign:1; |
57 | __u64 sign:1; |
58 | __u64 exp:11; |
58 | __u64 exp:11; |
59 | __u64 mantisa:52; |
59 | __u64 fraction:52; |
60 | #elif defined __LITTLE_ENDIAN__ |
60 | #elif defined __LITTLE_ENDIAN__ |
61 | __u64 mantisa:52; |
61 | __u64 fraction:52; |
62 | __u64 exp:11; |
62 | __u64 exp:11; |
63 | __u64 sign:1; |
63 | __u64 sign:1; |
64 | #else |
64 | #else |
65 | #error "Unknown endians." |
65 | #error "Unknown endians." |
66 | #endif |
66 | #endif |
Line 79... | Line 79... | ||
79 | 79 | ||
80 | #define FLOAT64_NAN 0x7FF8000000000001ll |
80 | #define FLOAT64_NAN 0x7FF8000000000001ll |
81 | #define FLOAT64_SIGNAN 0x7FF0000000000001ll |
81 | #define FLOAT64_SIGNAN 0x7FF0000000000001ll |
82 | #define FLOAT64_INF 0x7FF0000000000000ll |
82 | #define FLOAT64_INF 0x7FF0000000000000ll |
83 | 83 | ||
84 | #define FLOAT32_MANTISA_SIZE 23 |
84 | #define FLOAT32_FRACTION_SIZE 23 |
85 | #define FLOAT64_MANTISA_SIZE 52 |
85 | #define FLOAT64_FRACTION_SIZE 52 |
86 | 86 | ||
87 | #define FLOAT32_HIDDEN_BIT_MASK 0x800000 |
87 | #define FLOAT32_HIDDEN_BIT_MASK 0x800000 |
88 | #define FLOAT64_HIDDEN_BIT_MASK 0x10000000000000ll |
88 | #define FLOAT64_HIDDEN_BIT_MASK 0x10000000000000ll |
89 | 89 | ||
90 | #define FLOAT32_MAX_EXPONENT 0xFF |
90 | #define FLOAT32_MAX_EXPONENT 0xFF |