version 1.1, 2013/08/24 00:51:48 |
version 1.2, 2013/09/30 19:32:14 |
Line 52 __floatundidf(u_quad_t x) |
|
Line 52 __floatundidf(u_quad_t x) |
|
|
|
if (x == 0) |
if (x == 0) |
return 0.0; |
return 0.0; |
if (x == 1) |
|
return 1.0; |
|
|
|
u_int l = __builtin_clzll(x); |
u_int l = __builtin_clzll(x); |
x <<= (l + 1); /* clear implicit bit */ |
x <<= (l + 1); /* clear implicit bit */ |
if (x == 0) |
|
return 0x1.0p31; |
|
x >>= 64 - (DBL_FRACHBITS + DBL_FRACLBITS); |
x >>= 64 - (DBL_FRACHBITS + DBL_FRACLBITS); |
union uu u = { .uq = x }; |
union uu u = { .uq = x }; |
ux.dblu_frach = u.ul[H]; |
ux.dblu_frach = u.ul[H]; |