URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [unsorted/] [udconvert.c] - Rev 154
Compare with Previous | Blame | View Log
double unsigned_to_double1 (u) unsigned u; { double d; d = (int) u; /* convert as from a *signed* integer */ return ((int) u < 0) ? d + 4294967296.0 : d; } /* Alternatively */ double unsigned_to_double2 (u) unsigned u; { double d; u -= 2147483648; /* complement sign bit */ d = (int) u; /* convert as from a *signed* integer */ return d + 2147483648.0; } unsigned double_to_unsigned (d) double d; { d += 2147483648.0; return ((int) d) - 2147483648; }