Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/nearbyint.c
          +++ new/usr/src/lib/libm/common/m9x/nearbyint.c
↓ open down ↓ 92 lines elided ↑ open up ↑
  93   93          if (j >= 32) {
  94   94                  i = 1 << (j - 32);
  95   95                  frac = ((xx.i[HIWORD] << 1) << (63 - j)) |
  96   96                          (xx.i[LOWORD] >> (j - 32));
  97   97                  if (xx.i[LOWORD] & (i - 1))
  98   98                          frac |= 1;
  99   99                  if (!frac)
 100  100                          return (x);
 101  101                  xx.i[LOWORD] = 0;
 102  102                  xx.i[HIWORD] &= ~(i - 1);
 103      -                if (rm == FE_UPWARD || (rm == FE_TONEAREST &&
 104      -                        (frac > 0x80000000u || (frac == 0x80000000) &&
 105      -                        (xx.i[HIWORD] & i))))
      103 +                if ((rm == FE_UPWARD) || ((rm == FE_TONEAREST) &&
      104 +                        ((frac > 0x80000000u) || ((frac == 0x80000000) &&
      105 +                        (xx.i[HIWORD] & i)))))
 106  106                          xx.i[HIWORD] += i;
 107  107          } else {
 108  108                  i = 1 << j;
 109  109                  frac = (xx.i[LOWORD] << 1) << (31 - j);
 110  110                  if (!frac)
 111  111                          return (x);
 112  112                  xx.i[LOWORD] &= ~(i - 1);
 113      -                if (rm == FE_UPWARD || (rm == FE_TONEAREST &&
 114      -                        (frac > 0x80000000u || (frac == 0x80000000) &&
 115      -                        (xx.i[LOWORD] & i)))) {
      113 +                if ((rm == FE_UPWARD) || ((rm == FE_TONEAREST) &&
      114 +                        (frac > 0x80000000u || ((frac == 0x80000000) &&
      115 +                        (xx.i[LOWORD] & i))))) {
 116  116                          xx.i[LOWORD] += i;
 117  117                          if (xx.i[LOWORD] == 0)
 118  118                                  xx.i[HIWORD]++;
 119  119                  }
 120  120          }
 121  121          return (xx.d);
 122  122  }
 123  123  
 124  124  #if 0
 125  125  
↓ open down ↓ 98 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX