when i compile the following code float f = 6.3f % 2.1f; The answer must be 0.0. but it's not. but when i try this code float f = 8.4f % 2.1f; the answer is 0.0.

I think this is a bug in the math somewhere. Yes, you are correct. This should be 0. If you change the code to be... float myFloat; float firstFloat = 6.4f; float secondFloat = 2.1f; myFloat = firstFloat % secondFloat;

System.out.println(myFloat); You should get .1 for your answer, however instead you get 0.10000038 for your answer. Obviously we have an lack of precision here somewhere in the logic of this operator. Hope this helps. Dale

------------------ What's this H2SO4 doing in my fridge?? ( thud )

By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)