This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48236] uint64_t and int64_t behave differently when converting to float


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]