Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/LD/__sinl.c
          +++ new/usr/src/lib/libm/common/LD/__sinl.c
↓ open down ↓ 99 lines elided ↑ open up ↑
 100  100  qq4     =  2.480158730156105377771585658905303111866e-0005L,
 101  101  qq5     = -2.755728099762526325736488376695157008736e-0007L;
 102  102  /* INDENT ON */
 103  103  long double
 104  104  __k_sinl(long double x, long double y) {
 105  105          long double a, t, z, w;
 106  106          int *pt = (int *) &t, *px = (int *) &x;
 107  107          int i, j, hx, ix;
 108  108  
 109  109          t = 1.0L;
 110      -#if defined(_BIG_ENDIAN)
 111      -        hx = px[0];
 112      -#else
      110 +#if defined(__i386) || defined(__amd64)
 113  111          XTOI(px, hx);
      112 +#else
      113 +        hx = px[0];
 114  114  #endif
 115  115          ix = hx & 0x7fffffff;
 116  116          if (ix < 0x3ffc9000) {
 117  117                  if (ix < 0x3fc60000)
 118  118                          if (((int) x) == 0)
 119  119                                  return (x);     /* generate inexact */
 120  120                  z = x * x;
 121  121                  t = z * (p1 + z * (p2 + z * (p3 + z * (p4 + z * (p5 + z *
 122  122                          (p6 + z * (p7 + z * p8)))))));
 123  123                  t = y + x * t;
 124  124                  return (x + t);
 125  125          }
 126  126          j = (ix + 0x400) & 0x7ffff800;
 127  127          i = (j - 0x3ffc4000) >> 11;
 128      -#if defined(_BIG_ENDIAN)
 129      -        pt[0] = j;
 130      -#else
      128 +#if defined(__i386) || defined(__amd64)
 131  129          ITOX(j, pt);
      130 +#else
      131 +        pt[0] = j;
 132  132  #endif
 133  133          if (hx > 0)
 134  134                  x = y - (t - x);
 135  135          else
 136  136                  x = (-y) - (t + x);
 137  137          a = _TBL_sinl_hi[i];
 138  138          z = x * x;
 139  139          t = z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
 140  140          w = x * (one + z * (pp1 + z * (pp2 + z * (pp3 + z * (pp4 + z *
 141  141                  pp5)))));
 142  142          t = _TBL_cosl_hi[i] * w + a * t;
 143  143          t += _TBL_sinl_lo[i];
 144  144          if (hx < 0)
 145  145                  return (-a - t);
 146  146          else
 147  147                  return (a + t);
 148  148  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX