This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48236] uint64_t and int64_t behave differently when converting to float
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Mar 2011 14:50:37 +0000
- Subject: [Bug c/48236] uint64_t and int64_t behave differently when converting to float
- Auto-submitted: auto-generated
- References: <bug-48236-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48236
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-03-22 14:50:32 UTC ---
> From my understanding, a positive number should be casted to exactly the same
> floating value representation regardless if the variable is signed or unsigned.
> In fact, checking the failing values, we see this:
Above 2^24 and below 2^25, only even integers are not rounded when converted to
float and odd integers are rounded. I think it is what you report in comment
#3.