56 #include "QtCore/qglobal.h" 60 #if !defined(Q_CC_MIPS) 62 static const union {
unsigned char c[8];
double d; }
qt_be_inf_bytes = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
63 static const union {
unsigned char c[8];
double d; }
qt_le_inf_bytes = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
64 static const union {
unsigned char c[8];
double d; }
qt_armfpa_inf_bytes = { { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } };
70 return (QSysInfo::ByteOrder == QSysInfo::BigEndian
77 static const union {
unsigned char c[8];
double d; }
qt_be_snan_bytes = { { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 } };
78 static const union {
unsigned char c[8];
double d; }
qt_le_snan_bytes = { { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } };
79 static const union {
unsigned char c[8];
double d; }
qt_armfpa_snan_bytes = { { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 } };
85 return (QSysInfo::ByteOrder == QSysInfo::BigEndian
92 static const union {
unsigned char c[8];
double d; }
qt_be_qnan_bytes = { { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 } };
93 static const union {
unsigned char c[8];
double d; }
qt_le_qnan_bytes = { { 0, 0, 0, 0, 0, 0, 0xf8, 0xff } };
94 static const union {
unsigned char c[8];
double d; }
qt_armfpa_qnan_bytes = { { 0, 0, 0xf8, 0xff, 0, 0, 0, 0 } };
100 return (QSysInfo::ByteOrder == QSysInfo::BigEndian
108 static const unsigned char qt_be_inf_bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 };
109 static const unsigned char qt_le_inf_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
111 static inline double qt_inf()
113 const unsigned char *bytes;
117 bytes = (QSysInfo::ByteOrder == QSysInfo::BigEndian
122 union {
unsigned char c[8];
double d; } returnValue;
123 qMemCopy(returnValue.c, bytes,
sizeof(returnValue.c));
124 return returnValue.d;
128 static const unsigned char qt_be_snan_bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 };
129 static const unsigned char qt_le_snan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f };
133 const unsigned char *bytes;
137 bytes = (QSysInfo::ByteOrder == QSysInfo::BigEndian
142 union {
unsigned char c[8];
double d; } returnValue;
143 qMemCopy(returnValue.c, bytes,
sizeof(returnValue.c));
144 return returnValue.d;
148 static const unsigned char qt_be_qnan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 };
149 static const unsigned char qt_le_qnan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff };
153 const unsigned char *bytes;
157 bytes = (QSysInfo::ByteOrder == QSysInfo::BigEndian
162 union {
unsigned char c[8];
double d; } returnValue;
163 qMemCopy(returnValue.c, bytes,
sizeof(returnValue.c));
164 return returnValue.d;
173 return (ch[3] & 0x7f) == 0x7f && ch[2] == 0xf0;
175 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
176 return (ch[0] & 0x7f) == 0x7f && ch[1] == 0xf0;
178 return (ch[7] & 0x7f) == 0x7f && ch[6] == 0xf0;
187 return (ch[3] & 0x7f) == 0x7f && ch[2] > 0xf0;
189 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
190 return (ch[0] & 0x7f) == 0x7f && ch[1] > 0xf0;
192 return (ch[7] & 0x7f) == 0x7f && ch[6] > 0xf0;
201 return (ch[3] & 0x7f) != 0x7f || (ch[2] & 0xf0) != 0xf0;
203 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
204 return (ch[0] & 0x7f) != 0x7f || (ch[1] & 0xf0) != 0xf0;
206 return (ch[7] & 0x7f) != 0x7f || (ch[6] & 0xf0) != 0xf0;
214 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
215 return (ch[0] & 0x7f) == 0x7f && ch[1] == 0x80;
217 return (ch[3] & 0x7f) == 0x7f && ch[2] == 0x80;
224 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
225 return (ch[0] & 0x7f) == 0x7f && ch[1] > 0x80;
227 return (ch[3] & 0x7f) == 0x7f && ch[2] > 0x80;
234 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
235 return (ch[0] & 0x7f) != 0x7f || (ch[1] & 0x80) != 0x80;
237 return (ch[3] & 0x7f) != 0x7f || (ch[2] & 0x80) != 0x80;
243 #endif // QNUMERIC_P_H
#define QT_END_NAMESPACE
This macro expands to.
static const union @15 qt_le_snan_bytes
static const union @14 qt_be_snan_bytes
static bool qt_is_nan(double d)
static const union @13 qt_armfpa_inf_bytes
static const union @18 qt_le_qnan_bytes
#define QT_BEGIN_NAMESPACE
This macro expands to.
static const union @11 qt_be_inf_bytes
void * qMemCopy(void *dest, const void *src, size_t n)
static const union @16 qt_armfpa_snan_bytes
static bool qt_is_inf(double d)
static const union @19 qt_armfpa_qnan_bytes
static const union @12 qt_le_inf_bytes
static bool qt_is_finite(double d)
static const union @17 qt_be_qnan_bytes