version 1.5, 1994/08/10 20:32:03 |
version 1.6, 1994/08/18 23:06:29 |
Line 39 static double huge = 1.0e300; |
|
Line 39 static double huge = 1.0e300; |
|
double x; |
double x; |
#endif |
#endif |
{ |
{ |
int i0,i1,j0; |
int32_t i0,i1,j0; |
unsigned i,j; |
u_int32_t i,j; |
EXTRACT_WORDS(i0,i1,x); |
EXTRACT_WORDS(i0,i1,x); |
j0 = ((i0>>20)&0x7ff)-0x3ff; |
j0 = ((i0>>20)&0x7ff)-0x3ff; |
if(j0<20) { |
if(j0<20) { |
Line 61 static double huge = 1.0e300; |
|
Line 61 static double huge = 1.0e300; |
|
if(j0==0x400) return x+x; /* inf or NaN */ |
if(j0==0x400) return x+x; /* inf or NaN */ |
else return x; /* x is integral */ |
else return x; /* x is integral */ |
} else { |
} else { |
i = ((unsigned)(0xffffffff))>>(j0-20); |
i = ((u_int32_t)(0xffffffff))>>(j0-20); |
if((i1&i)==0) return x; /* x is integral */ |
if((i1&i)==0) return x; /* x is integral */ |
if(huge+x>0.0) { /* raise inexact flag */ |
if(huge+x>0.0) { /* raise inexact flag */ |
if(i0>0) { |
if(i0>0) { |