summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mingwex/math
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/math')
-rw-r--r--winsup/mingw/mingwex/math/powl.c13
-rw-r--r--winsup/mingw/mingwex/math/tanhl.c4
-rw-r--r--winsup/mingw/mingwex/math/tgammal.c6
3 files changed, 16 insertions, 7 deletions
diff --git a/winsup/mingw/mingwex/math/powl.c b/winsup/mingw/mingwex/math/powl.c
index f066eeaee..2a09ae1e0 100644
--- a/winsup/mingw/mingwex/math/powl.c
+++ b/winsup/mingw/mingwex/math/powl.c
@@ -269,8 +269,17 @@ static const unsigned short R[] = {
#else
#define MNEXP (-NXT*16384.0L)
#endif
-static const unsigned short L[] = {0xc2ef,0x705f,0xeca5,0xe2a8,0x3ffd, XPD};
-#define LOG2EA (*(long double *)(&L[0]))
+static const
+union
+{
+ unsigned short L[6];
+ long double ld;
+} log2ea = {{0xc2ef,0x705f,0xeca5,0xe2a8,0x3ffd, XPD}};
+
+#define LOG2EA (log2ea.ld)
+/*
+#define LOG2EA 0.44269504088896340735992L
+*/
#endif
#ifdef MIEEE
diff --git a/winsup/mingw/mingwex/math/tanhl.c b/winsup/mingw/mingwex/math/tanhl.c
index 3727b3990..d5d86d0ae 100644
--- a/winsup/mingw/mingwex/math/tanhl.c
+++ b/winsup/mingw/mingwex/math/tanhl.c
@@ -68,13 +68,13 @@ static long double Q[] = {
#endif
#ifdef IBMPC
-static short P[] = {
+static unsigned short P[] = {
0xd2a4,0x1b0c,0x8f15,0x8f99,0xbff1, XPD
0x5959,0x9111,0x9cc7,0xf4e2,0xbffe, XPD
0xb576,0xef5e,0x6d57,0xa81b,0xc005, XPD
0xe3be,0xbfbd,0x5cbc,0xa381,0xc009, XPD
};
-static short Q[] = {
+static unsigned short Q[] = {
/*0x0000,0x0000,0x0000,0x8000,0x3fff,*/
0x687f,0xce24,0xdd6c,0xc084,0x4005, XPD
0x3793,0xc95f,0xfa2f,0xe3b9,0x4009, XPD
diff --git a/winsup/mingw/mingwex/math/tgammal.c b/winsup/mingw/mingwex/math/tgammal.c
index 682a12e8e..f3fcdd6d5 100644
--- a/winsup/mingw/mingwex/math/tgammal.c
+++ b/winsup/mingw/mingwex/math/tgammal.c
@@ -88,7 +88,7 @@ static const long double Q[9] = {
};
#endif
#if IBMPC
-static const short P[] = {
+static const unsigned short P[] = {
0x434a,0x3f22,0x2bda,0xb0b2,0x3ff0, XPD
0xf5aa,0xe82f,0x335b,0xee2e,0x3ff3, XPD
0xbe6c,0x3757,0xc717,0x861b,0x3ff7, XPD
@@ -98,7 +98,7 @@ static const short P[] = {
0x29cf,0x19b3,0x16c8,0xd67a,0x3ffe, XPD
0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
};
-static const short Q[] = {
+static const unsigned short Q[] = {
0x5473,0x2de8,0x1268,0xea67,0xbfee, XPD
0x334b,0xc2f0,0xa2dd,0xf60e,0x3ff2, XPD
0xbeed,0x1853,0xa691,0xa23d,0xbff5, XPD
@@ -182,7 +182,7 @@ static const long double STIR[9] = {
};
#endif
#if IBMPC
-static const short STIR[] = {
+static const unsigned short STIR[] = {
0x6ede,0x69f7,0x54e3,0xbb5d,0x3ff4, XPD
0xc395,0x0295,0x4443,0xc64b,0xbfef, XPD
0xba6f,0x7c59,0x5e47,0x9bfb,0xbff4, XPD