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;
|
double d;
|
||||||
#if 1
|
#if 1
|
||||||
struct {
|
struct {
|
||||||
unsigned long lower;
|
unsigned int lower;
|
||||||
long upper;
|
int upper;
|
||||||
} l;
|
} l;
|
||||||
#else
|
#else
|
||||||
struct {
|
struct {
|
||||||
long upper;
|
int upper;
|
||||||
unsigned long lower;
|
unsigned int lower;
|
||||||
} l;
|
} l;
|
||||||
#endif
|
#endif
|
||||||
long long ll;
|
long long ll;
|
||||||
|
|
Loading…
Add table
Reference in a new issue