> That's quite interesting though - it is spotting that 0.1 can't be
> represented in a float and complaining, but it is OK with the other
> values that can be represented.
> That said, I don't think you can represent 0.1 as a double either...
> Maybe there's a tolerance margin...
>
> Still, seems odd. Maybe that's too high a warning level? I don't use the
> VC tools so have no real opinion (or knowledge) about them.

No miracles. You can't represent 0.1 with zero error in any binary
float format. Always exists small difference from the exact value.
(There is no problem for 1, 0.5, 0.25 and others).
Thus 0.1F != 0.1LF and the compiler reports about wrong cast of type.

http://www.binaryconvert.com/result_float.html?decimal=048046049

-- 
Best Regards
Nikita Egorov

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to