summaryrefslogtreecommitdiff
path: root/lib/libm/atanl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm/atanl.c')
-rw-r--r--lib/libm/atanl.c67
1 files changed, 21 insertions, 46 deletions
diff --git a/lib/libm/atanl.c b/lib/libm/atanl.c
index 1f1bff44..4a59fb40 100644
--- a/lib/libm/atanl.c
+++ b/lib/libm/atanl.c
@@ -44,28 +44,21 @@ static const long double atanlo[] = {
};
static const long double aT[] = {
- 3.33333333333333333017e-01L, -1.99999999999999632011e-01L,
- 1.42857142857046531280e-01L, -1.11111111100562372733e-01L,
- 9.09090902935647302252e-02L, -7.69230552476207730353e-02L,
- 6.66661718042406260546e-02L, -5.88158892835030888692e-02L,
- 5.25499891539726639379e-02L, -4.70119845393155721494e-02L,
- 4.03539201366454414072e-02L, -2.91303858419364158725e-02L,
+ 3.33333333333333333017e-01L, -1.99999999999999632011e-01L, 1.42857142857046531280e-01L,
+ -1.11111111100562372733e-01L, 9.09090902935647302252e-02L, -7.69230552476207730353e-02L,
+ 6.66661718042406260546e-02L, -5.88158892835030888692e-02L, 5.25499891539726639379e-02L,
+ -4.70119845393155721494e-02L, 4.03539201366454414072e-02L, -2.91303858419364158725e-02L,
1.24822046299269234080e-02L,
};
static long double T_even(long double x)
{
- return aT[0] +
- x * (aT[2] +
- x * (aT[4] + x * (aT[6] + x * (aT[8] + x * (aT[10] +
- x * aT[12])))));
+ return aT[0] + x * (aT[2] + x * (aT[4] + x * (aT[6] + x * (aT[8] + x * (aT[10] + x * aT[12])))));
}
static long double T_odd(long double x)
{
- return aT[1] +
- x * (aT[3] +
- x * (aT[5] + x * (aT[7] + x * (aT[9] + x * aT[11]))));
+ return aT[1] + x * (aT[3] + x * (aT[5] + x * (aT[7] + x * (aT[9] + x * aT[11]))));
}
#elif LDBL_MANT_DIG == 113
#define EXPMAN(u) ((u.i.se & 0x7fff) << 8 | u.i.top >> 8)
@@ -85,30 +78,18 @@ static const long double atanlo[] = {
};
static const long double aT[] = {
- 3.33333333333333333333333333333333125e-01L,
- -1.99999999999999999999999999999180430e-01L,
- 1.42857142857142857142857142125269827e-01L,
- -1.11111111111111111111110834490810169e-01L,
- 9.09090909090909090908522355708623681e-02L,
- -7.69230769230769230696553844935357021e-02L,
- 6.66666666666666660390096773046256096e-02L,
- -5.88235294117646671706582985209643694e-02L,
- 5.26315789473666478515847092020327506e-02L,
- -4.76190476189855517021024424991436144e-02L,
- 4.34782608678695085948531993458097026e-02L,
- -3.99999999632663469330634215991142368e-02L,
- 3.70370363987423702891250829918659723e-02L,
- -3.44827496515048090726669907612335954e-02L,
- 3.22579620681420149871973710852268528e-02L,
- -3.03020767654269261041647570626778067e-02L,
- 2.85641979882534783223403715930946138e-02L,
- -2.69824879726738568189929461383741323e-02L,
- 2.54194698498808542954187110873675769e-02L,
- -2.35083879708189059926183138130183215e-02L,
- 2.04832358998165364349957325067131428e-02L,
- -1.54489555488544397858507248612362957e-02L,
- 8.64492360989278761493037861575248038e-03L,
- -2.58521121597609872727919154569765469e-03L,
+ 3.33333333333333333333333333333333125e-01L, -1.99999999999999999999999999999180430e-01L,
+ 1.42857142857142857142857142125269827e-01L, -1.11111111111111111111110834490810169e-01L,
+ 9.09090909090909090908522355708623681e-02L, -7.69230769230769230696553844935357021e-02L,
+ 6.66666666666666660390096773046256096e-02L, -5.88235294117646671706582985209643694e-02L,
+ 5.26315789473666478515847092020327506e-02L, -4.76190476189855517021024424991436144e-02L,
+ 4.34782608678695085948531993458097026e-02L, -3.99999999632663469330634215991142368e-02L,
+ 3.70370363987423702891250829918659723e-02L, -3.44827496515048090726669907612335954e-02L,
+ 3.22579620681420149871973710852268528e-02L, -3.03020767654269261041647570626778067e-02L,
+ 2.85641979882534783223403715930946138e-02L, -2.69824879726738568189929461383741323e-02L,
+ 2.54194698498808542954187110873675769e-02L, -2.35083879708189059926183138130183215e-02L,
+ 2.04832358998165364349957325067131428e-02L, -1.54489555488544397858507248612362957e-02L,
+ 8.64492360989278761493037861575248038e-03L, -2.58521121597609872727919154569765469e-03L,
};
static long double T_even(long double x)
@@ -121,10 +102,7 @@ static long double T_even(long double x)
x * (aT[10] +
x * (aT[12] +
x * (aT[14] +
- x * (aT[16] +
- x * (aT[18] +
- x * (aT[20] +
- x * aT[22])))))))))));
+ x * (aT[16] + x * (aT[18] + x * (aT[20] + x * aT[22])))))))))));
}
static long double T_odd(long double x)
@@ -137,10 +115,7 @@ static long double T_odd(long double x)
x * (aT[11] +
x * (aT[13] +
x * (aT[15] +
- x * (aT[17] +
- x * (aT[19] +
- x * (aT[21] +
- x * aT[23])))))))))));
+ x * (aT[17] + x * (aT[19] + x * (aT[21] + x * aT[23])))))))))));
}
#endif
@@ -172,7 +147,7 @@ long double atanl(long double x)
id = -1;
} else {
x = fabsl(x);
- if (expman < (0x3fff << 8) + 0x30) { /* |x| < 1.1875 */
+ if (expman < (0x3fff << 8) + 0x30) { /* |x| < 1.1875 */
if (expman < ((0x3fff - 1) << 8) + 0x60) { /* 7/16 <=
|x| <
11/16 */