Possible Duplicate:
Floating point inaccuracy examples
When using the modulo operator in java I'm not getting the number I expect to get.
Heres what I'm doing:
double input = 5.59;
System.out.println("Output: " + (input % 2));
I expect to see 1.59 as the result however it is printing out 1.5899999999999999. Any clue as to why this may be?