I believe sizeof(double) is sizeof(int)*2 in most environments. On the other hand, sizeof(long) is equal to sizeof(double) in x86-64.
Unified · Split
| @@ -89,13 +89,13 @@ union double_long { · 88 unmodified lines | ||
| 89 | 89 | double d; |
| 90 | 90 | #if 1 |
| 91 | 91 | struct { |
| 92 | − unsigned long lower; | |
| 93 | − long upper; | |
| 92 | + unsigned int lower; | |
| 93 | + int upper; | |
| 94 | 94 | } l; |
| 95 | 95 | #else |
| 96 | 96 | struct { |
| 97 | − long upper; | |
| 98 | − unsigned long lower; | |
| 97 | + int upper; | |
| 98 | + unsigned int lower; | |
| 99 | 99 | } l; |
| 100 | 100 | #endif |
| 101 | 101 | long long ll; |