Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/tgamma.c
          +++ new/usr/src/lib/libm/common/m9x/tgamma.c
↓ open down ↓ 1398 lines elided ↑ open up ↑
1399 1399          t0z2_l = -1.5522348162858676890521e-17,
1400 1400          /* 0.819773101100500601787868704921606996312 */
1401 1401          t0z3   =  0.8197731011005006118708,
1402 1402          t0z3_l = -1.0082945122487103498325e-17;
1403 1403          /* 1.134861805732790769689793935774652917006 */
1404 1404  /* INDENT ON */
1405 1405  
1406 1406  /* gamma(x+i) for 0 <= x < 1  */
1407 1407  static struct Double
1408 1408  gam_n(int i, double x) {
1409      -        struct Double rr, yy;
     1409 +        struct Double rr = {0.0L, 0.0L}, yy;
1410 1410          double r1, r2, t2, z, xh, xl, yh, yl, zh, z1, z2, zl, x5, wh, wl;
1411 1411  
1412 1412          /* compute yy = gamma(x+1) */
1413 1413          if (x > 0.2845) {
1414 1414                  if (x > 0.6374) {
1415 1415                          r1 = x - t0z3;
1416 1416                          r2 = (double) ((float) (r1 - t0z3_l));
1417 1417                          t2 = r1 - r2;
1418 1418                          yy = GT3(r2, t2 - t0z3_l);
1419 1419                  } else {
↓ open down ↓ 131 lines elided ↑ open up ↑
1551 1551              (hx == 0x406573fa && lx > 0xE561F647)) {
1552 1552                  z = x / tiny;
1553 1553                  return (z * z);
1554 1554          }
1555 1555          if (hx >= 0x40200000) { /* x >= 8 */
1556 1556                  ww = large_gam(x, &m);
1557 1557                  w = ww.h + ww.l;
1558 1558                  __HI(w) += m << 20;
1559 1559                  return (w);
1560 1560          }
1561      -        if (hx > 0) {           /* x from 0 to 8 */
     1561 +        if (hx > 0) {           /* 0 < x < 8 */
1562 1562                  i = (int) x;
1563 1563                  ww = gam_n(i, x - (double) i);
1564 1564                  return (ww.h + ww.l);
1565 1565          }
1566 1566  
1567 1567          /* negative x */
1568 1568          /* INDENT OFF */
1569 1569          /*
1570 1570           * compute: xk =
1571 1571           *      -2 ... x is an even int (-inf is even)
↓ open down ↓ 133 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX