|XP is just a number|
Re: [Win32, C, and way OT] C floats, doubles, and their equivalenceby creamygoodness (Curate)
|on Jul 18, 2009 at 16:32 UTC||Need Help??|
Seems like the conversion glitch could be happening at several places.
Maybe the initial assignment of float foo needs a cast. MSVC warns about loss of precision in such cases -- maybe it's serious. :)
As a workaround, perhaps you could truncate the initial assignment of the double:
Lastly, maybe something is awry in the conversions that are being done during the comparison -- like it's ignoring your cast. It's a stab in the dark, but maybe a hack like this would get it to pay attention:
PS: This is relevant to the work I do ensuring Windows compatibility for my XS distros.