Print this page




  94  * |                x              |
  95  */
  96         t1      = +3.333333333333333333333333333333423342490e-0001L,
  97         t2      = +1.333333333333333333333333333093838744537e-0001L,
  98         t3      = +5.396825396825396825396827906318682662250e-0002L,
  99         t4      = +2.186948853615520282185576976994418486911e-0002L,
 100         t5      = +8.863235529902196573354554519991152936246e-0003L,
 101         t6      = +3.592128036572480064652191427543994878790e-0003L,
 102         t7      = +1.455834387051455257856833807581901305474e-0003L,
 103         t8      = +5.900274409318599857829983256201725587477e-0004L,
 104         t9      = +2.391291152117265181501116961901122362937e-0004L,
 105         t10     = +9.691533169382729742394024173194981882375e-0005L,
 106         t11     = +3.927994733186415603228178184225780859951e-0005L,
 107         t12     = +1.588300018848323824227640064883334101288e-0005L,
 108         t13     = +6.916271223396808311166202285131722231723e-0006L;
 109 
 110 #define i0      0
 111 
 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.0L;
 119         hx = px[i0];
 120         ix = hx & 0x7fffffff;
 121         if (ix < 0x3ffc4000) {
 122                 *(3 - i0 + (int *) &t) = 1; /* make t = one+ulp */
 123                 if (ix < 0x3fc60000) {
 124                         if (((int) (x * t)) < 1)     /* generate inexact */
 125                                 w = x;  /* generate underflow if subnormal */
 126                 } else {
 127                         z = x * x;
 128                         if (ix < 0x3ff30000) /* 2**-12 */
 129                                 t = z * (t1 + z * (t2 + z * (t3 + z * t4)));
 130                         else
 131                                 t = z * (t1 + z * (t2 + z * (t3 + z * (t4 +
 132                                         z * (t5 + z * (t6 + z * (t7 + z * (t8 +
 133                                         z * (t9 + z * (t10 + z * (t11 +
 134                                         z * (t12 + z * t13))))))))))));




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