[BACK]Return to s_modff.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libm / src

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libm/src/s_modff.c between version 1.1 and 1.2

version 1.1, 1994/08/10 20:32:55 version 1.2, 1994/08/18 23:07:12
Line 33  static float one = 1.0;
Line 33  static float one = 1.0;
         float x,*iptr;          float x,*iptr;
 #endif  #endif
 {  {
         int i0,j0;          int32_t i0,j0;
         unsigned i;          u_int32_t i;
         GET_FLOAT_WORD(i0,x);          GET_FLOAT_WORD(i0,x);
         j0 = ((i0>>23)&0xff)-0x7f;      /* exponent of x */          j0 = ((i0>>23)&0xff)-0x7f;      /* exponent of x */
         if(j0<23) {                     /* integer part in x */          if(j0<23) {                     /* integer part in x */
Line 44  static float one = 1.0;
Line 44  static float one = 1.0;
             } else {              } else {
                 i = (0x007fffff)>>j0;                  i = (0x007fffff)>>j0;
                 if((i0&i)==0) {                 /* x is integral */                  if((i0&i)==0) {                 /* x is integral */
                     unsigned int ix;                      u_int32_t ix;
                     *iptr = x;                      *iptr = x;
                     GET_FLOAT_WORD(ix,x);                      GET_FLOAT_WORD(ix,x);
                     SET_FLOAT_WORD(x,ix&0x80000000);    /* return +-0 */                      SET_FLOAT_WORD(x,ix&0x80000000);    /* return +-0 */
Line 55  static float one = 1.0;
Line 55  static float one = 1.0;
                 }                  }
             }              }
         } else {                        /* no fraction part */          } else {                        /* no fraction part */
             unsigned int ix;              u_int32_t ix;
             *iptr = x*one;              *iptr = x*one;
             GET_FLOAT_WORD(ix,x);              GET_FLOAT_WORD(ix,x);
             SET_FLOAT_WORD(x,ix&0x80000000);    /* return +-0 */              SET_FLOAT_WORD(x,ix&0x80000000);    /* return +-0 */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb <webmaster@jp.NetBSD.org>