Consider this:
double x,y; x =120.0; y = 0.05; double z= x % y;
I tried this and expected the result to be 0, but it came out 0.04933333.<
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems can help you understand why you get these "strange" results. There's a particular precision that floating point numbers can have. Just try these queries and have a look at the results:
0.5 in base 2
0.05 in base 2