[BACK]Return to e_sqrt.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/e_sqrt.c between version 1.4 and 1.5

version 1.4, 1994/03/03 17:04:21 version 1.5, 1994/08/10 20:31:31
Line 84  static char rcsid[] = "$Id$";
Line 84  static char rcsid[] = "$Id$";
  *---------------   *---------------
  */   */
   
 #include <math.h>  #include "math.h"
 #include <machine/endian.h>  #include "math_private.h"
   
 #if BYTE_ORDER == LITTLE_ENDIAN  
 #define n0      1  
 #else  
 #define n0      0  
 #endif  
   
 #ifdef __STDC__  #ifdef __STDC__
 static  const double    one     = 1.0, tiny=1.0e-300;  static  const double    one     = 1.0, tiny=1.0e-300;
Line 111  static double one = 1.0, tiny=1.0e-300;
Line 105  static double one = 1.0, tiny=1.0e-300;
         unsigned r,t1,s1,ix1,q1;          unsigned r,t1,s1,ix1,q1;
         int ix0,s0,q,m,t,i;          int ix0,s0,q,m,t,i;
   
         ix0 = *(n0+(int*)&x);                   /* high word of x */          EXTRACT_WORDS(ix0,ix1,x);
         ix1 = *((1-n0)+(int*)&x);               /* low word of x */  
   
     /* take care of Inf and NaN */      /* take care of Inf and NaN */
         if((ix0&0x7ff00000)==0x7ff00000) {          if((ix0&0x7ff00000)==0x7ff00000) {
Line 197  static double one = 1.0, tiny=1.0e-300;
Line 190  static double one = 1.0, tiny=1.0e-300;
         ix1 =  q1>>1;          ix1 =  q1>>1;
         if ((q&1)==1) ix1 |= sign;          if ((q&1)==1) ix1 |= sign;
         ix0 += (m <<20);          ix0 += (m <<20);
         *(n0+(int*)&z) = ix0;          INSERT_WORDS(z,ix0,ix1);
         *((1-n0)+(int*)&z) = ix1;  
         return z;          return z;
 }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVSweb <webmaster@jp.NetBSD.org>