Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/C/jn.c
          +++ new/usr/src/lib/libm/common/C/jn.c
↓ open down ↓ 63 lines elided ↑ open up ↑
  64   64  
  65   65  static const GENERIC
  66   66          invsqrtpi = 5.641895835477562869480794515607725858441e-0001,
  67   67          two     = 2.0,
  68   68          zero    = 0.0,
  69   69          one     = 1.0;
  70   70  
  71   71  GENERIC
  72   72  jn(int n, GENERIC x) {
  73   73          int i, sgn;
  74      -        GENERIC a, b, temp;
       74 +        GENERIC a, b, temp = 0;
  75   75          GENERIC z, w, ox, on;
  76   76  
  77   77      /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)
  78   78       * Thus, J(-n,x) = J(n,-x)
  79   79       */
  80   80          ox = x; on = (GENERIC)n;
  81   81          if(n<0){
  82   82                  n = -n;
  83   83                  x = -x;
  84   84          }
↓ open down ↓ 125 lines elided ↑ open up ↑
 210  210                  b = (t*j0(x)/b);
 211  211              }
 212  212          }
 213  213          if(sgn==1) return -b; else return b;
 214  214  }
 215  215  
 216  216  GENERIC
 217  217  yn(int n, GENERIC x) {
 218  218          int i;
 219  219          int sign;
 220      -        GENERIC a, b, temp, ox, on;
      220 +        GENERIC a, b, temp = 0, ox, on;
 221  221  
 222  222          ox = x; on = (GENERIC)n;
 223  223          if(isnan(x)) return x*x;        /* + -> * for Cheetah */
 224      -        if (x <= zero)
 225      -                if(x==zero)
      224 +        if (x <= zero) {
      225 +                if(x==zero) {
 226  226                          /* return -one/zero; */
 227  227                          return _SVID_libm_err((GENERIC)n,x,12);
 228      -                else
      228 +                } else {
 229  229                          /* return zero/zero; */
 230  230                          return _SVID_libm_err((GENERIC)n,x,13);
      231 +                }
      232 +        }
 231  233          if (!((int) _lib_version == libm_ieee ||
 232  234                  (__xpg6 & _C99SUSv3_math_errexcept) != 0)) {
 233  235              if(x > X_TLOSS) return _SVID_libm_err(on,ox,39);
 234  236          }
 235  237          sign = 1;
 236  238          if(n<0){
 237  239                  n = -n;
 238  240                  if((n&1) == 1) sign = -1;
 239  241          }
 240  242          if(n==0) return(y0(x));
↓ open down ↓ 40 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX