Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/tgammaf.c
          +++ new/usr/src/lib/libm/common/m9x/tgammaf.c
↓ open down ↓ 392 lines elided ↑ open up ↑
 393  393  t0z2 = 0.461632144968362341262659542325721328468,
 394  394  t0z3 = 0.819773101100500601787868704921606996312;
 395  395          /* 1.134861805732790769689793935774652917006 */
 396  396  /* INDENT ON */
 397  397  
 398  398  /*
 399  399   * gamma(x+i) for 0 <= x < 1
 400  400   */
 401  401  static double
 402  402  gam_n(int i, double x) {
 403      -        double rr, yy;
      403 +        double rr = 0.0L, yy;
 404  404          double z1, z2;
 405  405  
 406  406          /* compute yy = gamma(x+1) */
 407  407          if (x > 0.2845) {
 408  408                  if (x > 0.6374)
 409  409                          yy = GT3(x - t0z3);
 410  410                  else
 411  411                          yy = GT2(x - t0z2);
 412  412          } else
 413  413                  yy = GT1(x - t0z1);
↓ open down ↓ 51 lines elided ↑ open up ↑
 465  465  
 466  466          if (ix >= 0x7f800000)
 467  467                  return (xf * ((hx < 0)? 0.0F : xf)); /* +-Inf or NaN */
 468  468  
 469  469          if (hx > 0x420C290F)    /* x > 35.040096283... overflow */
 470  470                  return (float)(x / tiny);
 471  471  
 472  472          if (hx >= 0x41000000)   /* x >= 8 */
 473  473                  return ((float) large_gam(x));
 474  474  
 475      -        if (hx > 0) {           /* x from 0 to 8 */
      475 +        if (hx > 0) {           /* 0 < x < 8 */
 476  476                  i = (int) xf;
 477  477                  return ((float) gam_n(i, x - (double) i));
 478  478          }
 479  479  
 480  480          /* negative x */
 481  481          /* INDENT OFF */
 482  482          /*
 483  483           * compute xk =
 484  484           *      -2 ... x is an even int (-inf is considered even)
 485  485           *      -1 ... x is an odd int
↓ open down ↓ 62 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX