Use int*2 instead of long*2 to hold double value.
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.
This commit is contained in:
parent
2355fc7686
commit
ce8d71edbc
1 changed files with 4 additions and 4 deletions
|
@ -89,13 +89,13 @@ union double_long {
|
|||
double d;
|
||||
#if 1
|
||||
struct {
|
||||
unsigned long lower;
|
||||
long upper;
|
||||
unsigned int lower;
|
||||
int upper;
|
||||
} l;
|
||||
#else
|
||||
struct {
|
||||
long upper;
|
||||
unsigned long lower;
|
||||
int upper;
|
||||
unsigned int lower;
|
||||
} l;
|
||||
#endif
|
||||
long long ll;
|
||||
|
|
Loading…
Reference in a new issue