blob: 0b11b0f77256a5be00ec476f0607c56469c9feae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* Public domain. */
typedef unsigned int USItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
typedef float DFtype __attribute__ ((mode (DF)));
DFtype __floatundidf (UDItype);
DFtype
__floatundidf (UDItype u)
{
/* When the word size is small, we never get any rounding error. */
DFtype f = (USItype) (u >> (sizeof (USItype) * 8));
f *= 0x1p32f;
f += (USItype) u;
return f;
}
|