2009-07-17 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* mingwex/math/cephes_mconf.h mingwex/math/erfl.c mingwex/math/lgamma.c mingwex/math/lgammal.c mingwex/math/powl.c mingwex/math/sinhl.c mingwex/math/tanhl.c mingwex/math/tgamma.c mingwex/math/tgammal.c: Based on the fixes from the mingw-w64 code tree, fixed strict-aliasing issues.
This commit is contained in:
@@ -105,74 +105,71 @@ Copyright 1984, 1995 by Stephen L. Moshier
|
||||
1/8 <= 1/x <= 1
|
||||
Peak relative error 5.8e-21 */
|
||||
|
||||
static const unsigned short P[] = {
|
||||
0x4bf0,0x9ad8,0x7a03,0x86c7,0x401d, XPD
|
||||
0xdf23,0xd843,0x4032,0x8881,0x401e, XPD
|
||||
0xd025,0xcfd5,0x8494,0x88d3,0x401e, XPD
|
||||
0xb6d0,0xc92b,0x5417,0xacb1,0x401d, XPD
|
||||
0xada8,0x356a,0x4982,0x94a6,0x401c, XPD
|
||||
0x4e13,0xcaee,0x9e31,0xb258,0x401a, XPD
|
||||
0x5840,0x554d,0x37a3,0x9239,0x4018, XPD
|
||||
0x3b58,0x3da2,0xaf02,0x9780,0x4015, XPD
|
||||
0x0144,0x489e,0xbe68,0x9c31,0x4011, XPD
|
||||
0x333b,0xd9e6,0xd404,0x986f,0xbfee, XPD
|
||||
static const uLD P[] = {
|
||||
{ { 0x4bf0,0x9ad8,0x7a03,0x86c7,0x401d, XPD } },
|
||||
{ { 0xdf23,0xd843,0x4032,0x8881,0x401e, XPD } },
|
||||
{ { 0xd025,0xcfd5,0x8494,0x88d3,0x401e, XPD } },
|
||||
{ { 0xb6d0,0xc92b,0x5417,0xacb1,0x401d, XPD } },
|
||||
{ { 0xada8,0x356a,0x4982,0x94a6,0x401c, XPD } },
|
||||
{ { 0x4e13,0xcaee,0x9e31,0xb258,0x401a, XPD } },
|
||||
{ { 0x5840,0x554d,0x37a3,0x9239,0x4018, XPD } },
|
||||
{ { 0x3b58,0x3da2,0xaf02,0x9780,0x4015, XPD } },
|
||||
{ { 0x0144,0x489e,0xbe68,0x9c31,0x4011, XPD } },
|
||||
{ { 0x333b,0xd9e6,0xd404,0x986f,0xbfee, XPD } }
|
||||
};
|
||||
static const unsigned short Q[] = {
|
||||
/* 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD */
|
||||
0x0e43,0x302d,0x79ed,0x86c7,0x401d, XPD
|
||||
0xf817,0x9128,0xc0f8,0xd48b,0x401e, XPD
|
||||
0x8eae,0x8dad,0x6eb4,0x9aa2,0x401f, XPD
|
||||
0x00e7,0x7595,0xcd06,0x88bb,0x401f, XPD
|
||||
0x4991,0xcfda,0x52f1,0xa2a9,0x401e, XPD
|
||||
0xc39d,0xe415,0xc43d,0x87c0,0x401d, XPD
|
||||
0xa75d,0x436f,0x30dd,0xa027,0x401b, XPD
|
||||
0xc4cb,0x305a,0xbf78,0x8220,0x4019, XPD
|
||||
0x3708,0x33b1,0x07fa,0x8644,0x4016, XPD
|
||||
0x24fa,0x96f6,0x7153,0x8a6c,0x4012, XPD
|
||||
static const uLD Q[] = {
|
||||
{ { 0X0e43,0x302d,0x79ed,0x86c7,0x401d, XPD } },
|
||||
{ { 0xf817,0x9128,0xc0f8,0xd48b,0x401e, XPD } },
|
||||
{ { 0x8eae,0x8dad,0x6eb4,0x9aa2,0x401f, XPD } },
|
||||
{ { 0x00e7,0x7595,0xcd06,0x88bb,0x401f, XPD } },
|
||||
{ { 0x4991,0xcfda,0x52f1,0xa2a9,0x401e, XPD } },
|
||||
{ { 0xc39d,0xe415,0xc43d,0x87c0,0x401d, XPD } },
|
||||
{ { 0xa75d,0x436f,0x30dd,0xa027,0x401b, XPD } },
|
||||
{ { 0xc4cb,0x305a,0xbf78,0x8220,0x4019, XPD } },
|
||||
{ { 0x3708,0x33b1,0x07fa,0x8644,0x4016, XPD } },
|
||||
{ { 0x24fa,0x96f6,0x7153,0x8a6c,0x4012, XPD } }
|
||||
};
|
||||
|
||||
/* erfc(x) = exp(-x^2) 1/x R(1/x^2) / S(1/x^2)
|
||||
1/128 <= 1/x < 1/8
|
||||
Peak relative error 1.9e-21 */
|
||||
|
||||
static const unsigned short R[] = {
|
||||
0x260a,0xab95,0x2fc7,0xe7c4,0x4000, XPD
|
||||
0x4761,0x613e,0xdf6d,0xe58e,0x4001, XPD
|
||||
0x0615,0x4b00,0x575f,0xdc7b,0x4000, XPD
|
||||
0x521d,0x8527,0x3435,0x8dc2,0x3ffe, XPD
|
||||
0x22cf,0xc711,0x6c5b,0xdcfb,0x3ff9, XPD
|
||||
static const uLD R[] = {
|
||||
{ { 0x260a,0xab95,0x2fc7,0xe7c4,0x4000, XPD } },
|
||||
{ { 0x4761,0x613e,0xdf6d,0xe58e,0x4001, XPD } },
|
||||
{ { 0x0615,0x4b00,0x575f,0xdc7b,0x4000, XPD } },
|
||||
{ { 0x521d,0x8527,0x3435,0x8dc2,0x3ffe, XPD } },
|
||||
{ { 0x22cf,0xc711,0x6c5b,0xdcfb,0x3ff9, XPD } }
|
||||
};
|
||||
static const unsigned short S[] = {
|
||||
/* 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD */
|
||||
0x5de6,0x17d7,0x54d6,0xaba9,0x4002, XPD
|
||||
0x55d5,0xd300,0xe71e,0xf564,0x4002, XPD
|
||||
0xb611,0x8f76,0xf020,0xd255,0x4001, XPD
|
||||
0x3684,0x3798,0xb793,0x80b0,0x3fff, XPD
|
||||
0xf5af,0x2fb2,0x1e57,0xc3d7,0x3ffa, XPD
|
||||
static const uLD S[] = {
|
||||
{ { 0x5de6,0x17d7,0x54d6,0xaba9,0x4002, XPD } },
|
||||
{ { 0x55d5,0xd300,0xe71e,0xf564,0x4002, XPD } },
|
||||
{ { 0xb611,0x8f76,0xf020,0xd255,0x4001, XPD } },
|
||||
{ { 0x3684,0x3798,0xb793,0x80b0,0x3fff, XPD } },
|
||||
{ { 0xf5af,0x2fb2,0x1e57,0xc3d7,0x3ffa, XPD } }
|
||||
};
|
||||
|
||||
/* erf(x) = x T(x^2)/U(x^2)
|
||||
0 <= x <= 1
|
||||
Peak relative error 7.6e-23 */
|
||||
|
||||
static const unsigned short T[] = {
|
||||
0xfd7a,0x3a1a,0x705b,0xe0c4,0x3ffb, XPD
|
||||
0x3128,0xc337,0x3716,0xace5,0x4001, XPD
|
||||
0x9517,0x4e93,0x540e,0x8f97,0x4007, XPD
|
||||
0x6118,0x6059,0x9093,0xa757,0x400a, XPD
|
||||
0xb954,0xa987,0xc60c,0xbc83,0x400e, XPD
|
||||
0x7a56,0xe45a,0xa4bd,0x975b,0x4010, XPD
|
||||
0xc446,0x6bab,0x0b2a,0x86d0,0x4013, XPD
|
||||
static const uLD T[] = {
|
||||
{ { 0xfd7a,0x3a1a,0x705b,0xe0c4,0x3ffb, XPD } },
|
||||
{ { 0x3128,0xc337,0x3716,0xace5,0x4001, XPD } },
|
||||
{ { 0x9517,0x4e93,0x540e,0x8f97,0x4007, XPD } },
|
||||
{ { 0x6118,0x6059,0x9093,0xa757,0x400a, XPD } },
|
||||
{ { 0xb954,0xa987,0xc60c,0xbc83,0x400e, XPD } },
|
||||
{ { 0x7a56,0xe45a,0xa4bd,0x975b,0x4010, XPD } },
|
||||
{ { 0xc446,0x6bab,0x0b2a,0x86d0,0x4013, XPD } }
|
||||
};
|
||||
|
||||
static const unsigned short U[] = {
|
||||
/* 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD */
|
||||
0x3453,0x1f8e,0xf688,0xb507,0x4004, XPD
|
||||
0x71ac,0xb12f,0x21ca,0xf2e2,0x4008, XPD
|
||||
0xffe8,0x9cac,0x3b84,0xc2ac,0x400c, XPD
|
||||
0x481d,0x445b,0xc807,0xc232,0x400f, XPD
|
||||
0x9ad5,0x1aef,0x45b1,0xe25e,0x4011, XPD
|
||||
0x71a7,0x1cad,0x012e,0xeef3,0x4012, XPD
|
||||
static const uLD U[] = {
|
||||
{ { 0x3453,0x1f8e,0xf688,0xb507,0x4004, XPD } },
|
||||
{ { 0x71ac,0xb12f,0x21ca,0xf2e2,0x4008, XPD } },
|
||||
{ { 0xffe8,0x9cac,0x3b84,0xc2ac,0x400c, XPD } },
|
||||
{ { 0x481d,0x445b,0xc807,0xc232,0x400f, XPD } },
|
||||
{ { 0x9ad5,0x1aef,0x45b1,0xe25e,0x4011, XPD } },
|
||||
{ { 0x71a7,0x1cad,0x012e,0xeef3,0x4012, XPD } }
|
||||
};
|
||||
|
||||
/* expx2l.c
|
||||
|
Reference in New Issue
Block a user