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:
Shinichiro Hamaji 2008-12-01 02:10:06 +09:00 committed by grischka
parent 2355fc7686
commit ce8d71edbc

View File

@ -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;