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