summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mingwex/math/powl.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/math/powl.c')
-rw-r--r--winsup/mingw/mingwex/math/powl.c143
1 files changed, 71 insertions, 72 deletions
diff --git a/winsup/mingw/mingwex/math/powl.c b/winsup/mingw/mingwex/math/powl.c
index f85e55653..75e6f7dbe 100644
--- a/winsup/mingw/mingwex/math/powl.c
+++ b/winsup/mingw/mingwex/math/powl.c
@@ -184,85 +184,84 @@ static long double R[] = {
#ifdef IBMPC
-static const unsigned short P[] = {
-0xb804,0xa8b7,0xc6f4,0xda6a,0x3ff4, XPD
-0x7de9,0xcf02,0x58c0,0xfae1,0x3ffd, XPD
-0x405a,0x3722,0x67c9,0xe000,0x3fff, XPD
-0xcd99,0x6b43,0x87ca,0xb333,0x3fff, XPD
+static const uLD P[] = {
+{ { 0xb804,0xa8b7,0xc6f4,0xda6a,0x3ff4, XPD } },
+{ { 0x7de9,0xcf02,0x58c0,0xfae1,0x3ffd, XPD } },
+{ { 0x405a,0x3722,0x67c9,0xe000,0x3fff, XPD } },
+{ { 0xcd99,0x6b43,0x87ca,0xb333,0x3fff, XPD } }
};
-static const unsigned short Q[] = {
-/* 0x0000,0x0000,0x0000,0x8000,0x3fff, */
-0x6307,0xa469,0x3b33,0xa800,0x4001, XPD
-0xfec2,0x62d7,0xa51c,0x8666,0x4002, XPD
-0xda32,0xd072,0xa5d7,0x8666,0x4001, XPD
+static const uLD Q[] = {
+{ { 0x6307,0xa469,0x3b33,0xa800,0x4001, XPD } },
+{ { 0xfec2,0x62d7,0xa51c,0x8666,0x4002, XPD } },
+{ { 0xda32,0xd072,0xa5d7,0x8666,0x4001, XPD } }
};
-static const unsigned short A[] = {
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-0x033a,0x722a,0xb2db,0xfa83,0x3ffe, XPD
-0xcc2c,0x2486,0x7d15,0xf525,0x3ffe, XPD
-0xf5cb,0xdcda,0xb99b,0xefe4,0x3ffe, XPD
-0x392f,0xdd24,0xc6e7,0xeac0,0x3ffe, XPD
-0x48a8,0x7c83,0x06e7,0xe5b9,0x3ffe, XPD
-0xe111,0x2a94,0xdeec,0xe0cc,0x3ffe, XPD
-0x3755,0xdaf2,0xb797,0xdbfb,0x3ffe, XPD
-0x6af4,0xd69d,0xfcca,0xd744,0x3ffe, XPD
-0xe45a,0xf12a,0x1d91,0xd2a8,0x3ffe, XPD
-0x80e4,0x1f84,0x8c15,0xce24,0x3ffe, XPD
-0x27a3,0x6e2f,0xbd86,0xc9b9,0x3ffe, XPD
-0xdadd,0x5506,0x2a11,0xc567,0x3ffe, XPD
-0x9456,0x6670,0x4cca,0xc12c,0x3ffe, XPD
-0x36bf,0x580c,0xa39f,0xbd08,0x3ffe, XPD
-0x9ee9,0x62fb,0xaf47,0xb8fb,0x3ffe, XPD
-0x6484,0xf9de,0xf333,0xb504,0x3ffe, XPD
-0x2590,0xd2ac,0xf581,0xb123,0x3ffe, XPD
-0x4ac6,0x42a1,0x3eea,0xad58,0x3ffe, XPD
-0x0ef8,0xea7c,0x5ab4,0xa9a1,0x3ffe, XPD
-0x38ea,0xb151,0xd6a9,0xa5fe,0x3ffe, XPD
-0x6819,0x0c49,0x4303,0xa270,0x3ffe, XPD
-0x11ae,0x91a1,0x3260,0x9ef5,0x3ffe, XPD
-0x5539,0xd54e,0x39b9,0x9b8d,0x3ffe, XPD
-0xa96f,0x8db8,0xf051,0x9837,0x3ffe, XPD
-0x0961,0xfef7,0xefa8,0x94f4,0x3ffe, XPD
-0xc336,0xab11,0xd373,0x91c3,0x3ffe, XPD
-0x53c0,0x45cd,0x398b,0x8ea4,0x3ffe, XPD
-0xd6e7,0xea8b,0xc1e3,0x8b95,0x3ffe, XPD
-0x8527,0x92da,0x0e80,0x8898,0x3ffe, XPD
-0x7b15,0xcc48,0xc367,0x85aa,0x3ffe, XPD
-0xa1d7,0xac2b,0x8698,0x82cd,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0x3ffe, XPD
+static const uLD A[] = {
+{ { 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD } },
+{ { 0x033a,0x722a,0xb2db,0xfa83,0x3ffe, XPD } },
+{ { 0xcc2c,0x2486,0x7d15,0xf525,0x3ffe, XPD } },
+{ { 0xf5cb,0xdcda,0xb99b,0xefe4,0x3ffe, XPD } },
+{ { 0x392f,0xdd24,0xc6e7,0xeac0,0x3ffe, XPD } },
+{ { 0x48a8,0x7c83,0x06e7,0xe5b9,0x3ffe, XPD } },
+{ { 0xe111,0x2a94,0xdeec,0xe0cc,0x3ffe, XPD } },
+{ { 0x3755,0xdaf2,0xb797,0xdbfb,0x3ffe, XPD } },
+{ { 0x6af4,0xd69d,0xfcca,0xd744,0x3ffe, XPD } },
+{ { 0xe45a,0xf12a,0x1d91,0xd2a8,0x3ffe, XPD } },
+{ { 0x80e4,0x1f84,0x8c15,0xce24,0x3ffe, XPD } },
+{ { 0x27a3,0x6e2f,0xbd86,0xc9b9,0x3ffe, XPD } },
+{ { 0xdadd,0x5506,0x2a11,0xc567,0x3ffe, XPD } },
+{ { 0x9456,0x6670,0x4cca,0xc12c,0x3ffe, XPD } },
+{ { 0x36bf,0x580c,0xa39f,0xbd08,0x3ffe, XPD } },
+{ { 0x9ee9,0x62fb,0xaf47,0xb8fb,0x3ffe, XPD } },
+{ { 0x6484,0xf9de,0xf333,0xb504,0x3ffe, XPD } },
+{ { 0x2590,0xd2ac,0xf581,0xb123,0x3ffe, XPD } },
+{ { 0x4ac6,0x42a1,0x3eea,0xad58,0x3ffe, XPD } },
+{ { 0x0ef8,0xea7c,0x5ab4,0xa9a1,0x3ffe, XPD } },
+{ { 0x38ea,0xb151,0xd6a9,0xa5fe,0x3ffe, XPD } },
+{ { 0x6819,0x0c49,0x4303,0xa270,0x3ffe, XPD } },
+{ { 0x11ae,0x91a1,0x3260,0x9ef5,0x3ffe, XPD } },
+{ { 0x5539,0xd54e,0x39b9,0x9b8d,0x3ffe, XPD } },
+{ { 0xa96f,0x8db8,0xf051,0x9837,0x3ffe, XPD } },
+{ { 0x0961,0xfef7,0xefa8,0x94f4,0x3ffe, XPD } },
+{ { 0xc336,0xab11,0xd373,0x91c3,0x3ffe, XPD } },
+{ { 0x53c0,0x45cd,0x398b,0x8ea4,0x3ffe, XPD } },
+{ { 0xd6e7,0xea8b,0xc1e3,0x8b95,0x3ffe, XPD } },
+{ { 0x8527,0x92da,0x0e80,0x8898,0x3ffe, XPD } },
+{ { 0x7b15,0xcc48,0xc367,0x85aa,0x3ffe, XPD } },
+{ { 0xa1d7,0xac2b,0x8698,0x82cd,0x3ffe, XPD } },
+{ { 0x0000,0x0000,0x0000,0x8000,0x3ffe, XPD } }
};
-static const unsigned short B[] = {
-0x0000,0x0000,0x0000,0x0000,0x0000, XPD
-0x1f87,0xdb30,0x18f5,0xf73a,0x3fbd, XPD
-0xac15,0x3e46,0x2932,0xbf4a,0xbfbc, XPD
-0x7944,0xba66,0xa091,0xcb12,0x3fb9, XPD
-0xff78,0x40b4,0x2ee6,0xe69a,0x3fbc, XPD
-0xc895,0x5069,0xe383,0xee53,0xbfbb, XPD
-0x7cde,0x9376,0x4325,0xf8ab,0x3fbc, XPD
-0xa10c,0x25e0,0xc093,0xaefd,0xbfbd, XPD
-0x7d3e,0xea95,0x1366,0xb2fb,0x3fbd, XPD
-0x5d89,0xeb34,0x5191,0x9301,0x3fbd, XPD
-0x80d9,0xb883,0xfb10,0xe5eb,0x3fbb, XPD
-0x045d,0x288c,0xc1ec,0xbedd,0xbfbd, XPD
-0xeded,0x5c85,0x4630,0x8d5a,0x3fbd, XPD
-0x9d82,0xe5ac,0x8e0a,0xfd6d,0x3fba, XPD
-0x6dfd,0xeb58,0xaf14,0x8373,0xbfb9, XPD
-0xf938,0x7aac,0x91cf,0xe8da,0xbfbc, XPD
-0x0000,0x0000,0x0000,0x0000,0x0000, XPD
+static const uLD B[] = {
+{ { 0x0000,0x0000,0x0000,0x0000,0x0000, XPD } },
+{ { 0x1f87,0xdb30,0x18f5,0xf73a,0x3fbd, XPD } },
+{ { 0xac15,0x3e46,0x2932,0xbf4a,0xbfbc, XPD } },
+{ { 0x7944,0xba66,0xa091,0xcb12,0x3fb9, XPD } },
+{ { 0xff78,0x40b4,0x2ee6,0xe69a,0x3fbc, XPD } },
+{ { 0xc895,0x5069,0xe383,0xee53,0xbfbb, XPD } },
+{ { 0x7cde,0x9376,0x4325,0xf8ab,0x3fbc, XPD } },
+{ { 0xa10c,0x25e0,0xc093,0xaefd,0xbfbd, XPD } },
+{ { 0x7d3e,0xea95,0x1366,0xb2fb,0x3fbd, XPD } },
+{ { 0x5d89,0xeb34,0x5191,0x9301,0x3fbd, XPD } },
+{ { 0x80d9,0xb883,0xfb10,0xe5eb,0x3fbb, XPD } },
+{ { 0x045d,0x288c,0xc1ec,0xbedd,0xbfbd, XPD } },
+{ { 0xeded,0x5c85,0x4630,0x8d5a,0x3fbd, XPD } },
+{ { 0x9d82,0xe5ac,0x8e0a,0xfd6d,0x3fba, XPD } },
+{ { 0x6dfd,0xeb58,0xaf14,0x8373,0xbfb9, XPD } },
+{ { 0xf938,0x7aac,0x91cf,0xe8da,0xbfbc, XPD } },
+{ { 0x0000,0x0000,0x0000,0x0000,0x0000, XPD } }
};
-static const unsigned short R[] = {
-0xa69b,0x530e,0xee1d,0xfd2a,0x3fee, XPD
-0xc746,0x8e7e,0x5960,0xa182,0x3ff2, XPD
-0x63b6,0xadda,0xfd6a,0xaec3,0x3ff5, XPD
-0xc104,0xfd99,0x5b7c,0x9d95,0x3ff8, XPD
-0xe05e,0x249d,0x46b8,0xe358,0x3ffa, XPD
-0x5d1d,0x162c,0xeffc,0xf5fd,0x3ffc, XPD
-0x79aa,0xd1cf,0x17f7,0xb172,0x3ffe, XPD
+static const uLD R[] = {
+{ { 0xa69b,0x530e,0xee1d,0xfd2a,0x3fee, XPD } },
+{ { 0xc746,0x8e7e,0x5960,0xa182,0x3ff2, XPD } },
+{ { 0x63b6,0xadda,0xfd6a,0xaec3,0x3ff5, XPD } },
+{ { 0xc104,0xfd99,0x5b7c,0x9d95,0x3ff8, XPD } },
+{ { 0xe05e,0x249d,0x46b8,0xe358,0x3ffa, XPD } },
+{ { 0x5d1d,0x162c,0xeffc,0xf5fd,0x3ffc, XPD } },
+{ { 0x79aa,0xd1cf,0x17f7,0xb172,0x3ffe, XPD } }
};
/* 10 byte sizes versus 12 byte */
-#define douba(k) (*(long double *)(&A[(sizeof( long double )/2)*(k)]))
-#define doubb(k) (*(long double *)(&B[(sizeof( long double )/2)*(k)]))
+#define douba(k) (A[(k)].ld)
+#define doubb(k) (B[(k)].ld)
#define MEXP (NXT*16384.0L)
#ifdef DENORMAL
#define MNEXP (-NXT*(16384.0L+64.0L))