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