On Mon, Sep 15, 2003 at 04:05:05PM -0400, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Because it isn't in the domain of the float type, of course.
IMHO, any numerical (integer) value is in domain of the float type.
The difference is in fractional part (and precision, somehow), which isn't present in integers.
If I see construct like:
if (x < 2) ...; I assume that this condition should check if x is _numerically_ less than 2, so it doesn't matter is x float, integer, mpi etc. Anyway:
1.0 < 2;
(5) Result: 1
1.0 > 2;
(6) Result: 0
So... Where is the point? 1.0 < 2 but 1.0 == 1 is false... Weird...
Regards, /Al