94 * |tan(x) - (x+t1*x^3+...+t6*x^13)|
95 * |------------------------------ | <= 2^-59.73 for |x|<0.15625
96 * | x |
97 */
98 t1 = 3.333333333333333333333333333333423342490e-0001L,
99 t2 = 1.333333333333333333333333333093838744537e-0001L,
100 t3 = 5.396825396825396825396827906318682662250e-0002L,
101 t4 = 2.186948853615520282185576976994418486911e-0002L,
102 t5 = 8.863235529902196573354554519991152936246e-0003L,
103 t6 = 3.592128036572480064652191427543994878790e-0003L,
104 t7 = 1.455834387051455257856833807581901305474e-0003L,
105 t8 = 5.900274409318599857829983256201725587477e-0004L,
106 t9 = 2.391291152117265181501116961901122362937e-0004L,
107 t10 = 9.691533169382729742394024173194981882375e-0005L,
108 t11 = 3.927994733186415603228178184225780859951e-0005L,
109 t12 = 1.588300018848323824227640064883334101288e-0005L,
110 t13 = 6.916271223396808311166202285131722231723e-0006L;
111 /* INDENT ON */
112 long double
113 __k_tanl(long double x, long double y, int k) {
114 long double a, t, z, w, s, c;
115 int *pt = (int *) &t, *px = (int *) &x;
116 int i, j, hx, ix;
117
118 t = 1.0;
119 #if defined(__i386) || defined(__amd64)
120 XTOI(px, hx);
121 #else
122 hx = px[0];
123 #endif
124 ix = hx & 0x7fffffff;
125 if (ix < 0x3ffc4000) {
126 if (ix < 0x3fc60000) {
127 if ((i = (int) x) == 0) /* generate inexact */
128 w = x;
129 } else {
130 z = x * x;
131 if (ix < 0x3ff30000) /* 2**-12 */
132 t = z * (t1 + z * (t2 + z * (t3 + z * t4)));
133 else
134 t = z * (t1 + z * (t2 + z * (t3 + z * (t4 +
|
94 * |tan(x) - (x+t1*x^3+...+t6*x^13)|
95 * |------------------------------ | <= 2^-59.73 for |x|<0.15625
96 * | x |
97 */
98 t1 = 3.333333333333333333333333333333423342490e-0001L,
99 t2 = 1.333333333333333333333333333093838744537e-0001L,
100 t3 = 5.396825396825396825396827906318682662250e-0002L,
101 t4 = 2.186948853615520282185576976994418486911e-0002L,
102 t5 = 8.863235529902196573354554519991152936246e-0003L,
103 t6 = 3.592128036572480064652191427543994878790e-0003L,
104 t7 = 1.455834387051455257856833807581901305474e-0003L,
105 t8 = 5.900274409318599857829983256201725587477e-0004L,
106 t9 = 2.391291152117265181501116961901122362937e-0004L,
107 t10 = 9.691533169382729742394024173194981882375e-0005L,
108 t11 = 3.927994733186415603228178184225780859951e-0005L,
109 t12 = 1.588300018848323824227640064883334101288e-0005L,
110 t13 = 6.916271223396808311166202285131722231723e-0006L;
111 /* INDENT ON */
112 long double
113 __k_tanl(long double x, long double y, int k) {
114 long double a, t, z, w = 0.0, s, c;
115 int *pt = (int *) &t, *px = (int *) &x;
116 int i, j, hx, ix;
117
118 t = 1.0;
119 #if defined(__i386) || defined(__amd64)
120 XTOI(px, hx);
121 #else
122 hx = px[0];
123 #endif
124 ix = hx & 0x7fffffff;
125 if (ix < 0x3ffc4000) {
126 if (ix < 0x3fc60000) {
127 if ((i = (int) x) == 0) /* generate inexact */
128 w = x;
129 } else {
130 z = x * x;
131 if (ix < 0x3ff30000) /* 2**-12 */
132 t = z * (t1 + z * (t2 + z * (t3 + z * t4)));
133 else
134 t = z * (t1 + z * (t2 + z * (t3 + z * (t4 +
|