1162
|
1 |
# HG changeset patch
|
|
2 |
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
1181
|
3 |
# Parent fa8a5832a374ccd7af5db927b992b5d9f15273ef
|
1162
|
4 |
|
|
5 |
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
|
|
6 |
--- a/modules/fdlibm/src/math_private.h
|
|
7 |
+++ b/modules/fdlibm/src/math_private.h
|
1179
|
8 |
@@ -25,19 +25,24 @@
|
1162
|
9 |
|
1179
|
10 |
#include "fdlibm.h"
|
1162
|
11 |
|
|
12 |
/*
|
|
13 |
* Emulate FreeBSD internal double types.
|
|
14 |
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
|
|
15 |
*/
|
|
16 |
|
|
17 |
+#ifdef __i386__
|
|
18 |
+typedef long double __double_t;
|
1179
|
19 |
+typedef long double __float_t;
|
1162
|
20 |
+#else
|
|
21 |
typedef double __double_t;
|
1179
|
22 |
+typedef float __float_t;
|
1162
|
23 |
+#endif
|
|
24 |
typedef __double_t double_t;
|
1179
|
25 |
-typedef float __float_t;
|
1162
|
26 |
|
|
27 |
/*
|
|
28 |
* The original fdlibm code used statements like:
|
|
29 |
* n0 = ((*(int*)&one)>>29)^1; * index of high word *
|
|
30 |
* ix0 = *(n0+(int*)&x); * high word of x *
|
|
31 |
* ix1 = *((1-n0)+(int*)&x); * low word of x *
|
|
32 |
* to dig two 32 bit words out of the 64 bit IEEE floating point
|
1181
|
33 |
* value. That is non-ANSI, and, moreover, the gcc instruction
|