Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/nearbyintf.c
          +++ new/usr/src/lib/libm/common/m9x/nearbyintf.c
↓ open down ↓ 72 lines elided ↑ open up ↑
  73   73          }
  74   74  
  75   75          /* round x at the integer bit */
  76   76          i = 1 << (0x96 - (hx >> 23));
  77   77          frac = hx & (i - 1);
  78   78          if (!frac)
  79   79                  return (x);
  80   80  
  81   81          hx &= ~(i - 1);
  82   82          if (rm == FE_UPWARD || (rm == FE_TONEAREST && (frac > (i >> 1) ||
  83      -                (frac == (i >> 1)) && (hx & i))))
       83 +                ((frac == (i >> 1)) && (hx & i)))))
  84   84                  xx.i = sx | (hx + i);
  85   85          else
  86   86                  xx.i = sx | hx;
  87   87          return (xx.f);
  88   88  }
  89   89  
  90   90  #if 0
  91   91  
  92   92  /*
  93   93   * Alternate implementations for SPARC, x86, using fp ops.  These may
↓ open down ↓ 93 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX