2021-10-06 09:02:07 +02:00
|
|
|
# HG changeset patch
|
|
|
|
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
2022-11-16 14:36:59 +01:00
|
|
|
# Parent fa8a5832a374ccd7af5db927b992b5d9f15273ef
|
2021-10-06 09:02:07 +02:00
|
|
|
|
|
|
|
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
|
|
|
|
--- a/modules/fdlibm/src/math_private.h
|
|
|
|
+++ b/modules/fdlibm/src/math_private.h
|
2022-10-09 22:45:53 +02:00
|
|
|
@@ -25,19 +25,24 @@
|
2021-10-06 09:02:07 +02:00
|
|
|
|
2022-10-06 09:14:45 +02:00
|
|
|
#include "fdlibm.h"
|
2021-10-06 09:02:07 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Emulate FreeBSD internal double types.
|
|
|
|
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
|
|
|
|
*/
|
|
|
|
|
|
|
|
+#ifdef __i386__
|
|
|
|
+typedef long double __double_t;
|
2022-10-09 22:45:53 +02:00
|
|
|
+typedef long double __float_t;
|
2021-10-06 09:02:07 +02:00
|
|
|
+#else
|
|
|
|
typedef double __double_t;
|
2022-10-09 22:45:53 +02:00
|
|
|
+typedef float __float_t;
|
2021-10-06 09:02:07 +02:00
|
|
|
+#endif
|
|
|
|
typedef __double_t double_t;
|
2022-10-09 22:45:53 +02:00
|
|
|
-typedef float __float_t;
|
2021-10-06 09:02:07 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The original fdlibm code used statements like:
|
|
|
|
* n0 = ((*(int*)&one)>>29)^1; * index of high word *
|
|
|
|
* ix0 = *(n0+(int*)&x); * high word of x *
|
2022-10-09 22:45:53 +02:00
|
|
|
* ix1 = *((1-n0)+(int*)&x); * low word of x *
|
|
|
|
* to dig two 32 bit words out of the 64 bit IEEE floating point
|
2022-11-16 14:36:59 +01:00
|
|
|
* value. That is non-ANSI, and, moreover, the gcc instruction
|