Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/LD/jnl.c
          +++ new/usr/src/lib/libm/common/LD/jnl.c
↓ open down ↓ 64 lines elided ↑ open up ↑
  65   65  
  66   66  static const GENERIC
  67   67  invsqrtpi= 5.641895835477562869480794515607725858441e-0001L,
  68   68  two  = 2.0L,
  69   69  zero = 0.0L,
  70   70  one  = 1.0L;
  71   71  
  72   72  GENERIC
  73   73  jnl(n,x) int n; GENERIC x;{
  74   74          int i, sgn;
  75      -        GENERIC a, b, temp, z, w;
       75 +        GENERIC a, b, temp = 0, z, w;
  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          if(n<0){                
  81   81                  n = -n;
  82   82                  x = -x;
  83   83          }
  84   84          if(n==0) return(j0l(x));
  85   85          if(n==1) return(j1l(x));
↓ open down ↓ 119 lines elided ↑ open up ↑
 205  205                  b = (t*j0l(x)/b);
 206  206              }
 207  207          }
 208  208          if(sgn==1) return -b; else return b;
 209  209  }
 210  210  
 211  211  GENERIC ynl(n,x) 
 212  212  int n; GENERIC x;{
 213  213          int i;
 214  214          int sign;
 215      -        GENERIC a, b, temp;
      215 +        GENERIC a, b, temp = 0;
 216  216  
 217      -        if(x!=x) return x+x;
 218      -        if (x <= zero) 
      217 +        if(x!=x)
      218 +                return x+x;
      219 +        if (x <= zero) {
 219  220                  if(x==zero) 
 220  221                          return -one/zero;
 221  222                  else 
 222  223                          return zero/zero;
      224 +        }
 223  225          sign = 1;
 224  226          if(n<0){
 225  227                  n = -n;
 226  228                  if((n&1) == 1) sign = -1;
 227  229          }
 228  230          if(n==0) return(y0l(x));
 229  231          if(n==1) return(sign*y1l(x));
 230  232          if(!finitel(x)) return zero;
 231  233  
 232  234          if(x>1.0e91L) { /* x >> n**2 
↓ open down ↓ 36 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX