[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible Bug in bitlib under Windows?
- From: "Doug Currie" <doug.currie@...>
- Date: Fri, 12 Dec 2008 16:55:05 -0500
On Fri, Dec 12, 2008 at 3:58 PM, Doug Currie <firstname.lastname@example.org>
related. I suspect this stems from a double to int32_t conversion. Since 0x0000ffffffff is outside the range of int32_t the conversion is returning an "integer NaN." In other words, the conversion is assumed to be signed, whereas the value you "want" is unsigned.
Searching the MS site, I found
Conversions from float, double, or long double values to unsigned long are not accurate if the value being converted is larger than the maximum positive long value.