Originally posted by Viji:
- What are the type declarations for these? Please give the correct problem description. For the case given below:
int x = 5;
int y = 5;
if (x <= y) ... here x <= y definitely evaluates to true!
HTH
This is why I ask for more program information. You are correct Viji. However if the program is
The if
test now returns false even though 15.3/3.1 is obviously 5.
The problem is floating point math. The actual result of this operation is 4.935483870967742
and is less than 5.