This is from one of the cattle drive assignments. The purpose of this particular assignment is to learn the boundaries of double. In a previous assignment the student learned the boundaries of int and long.
The important thing is that as you add all these imprecisions up, they turn into bigger inprecisions. Finally, if you have a value that is approximately 100.0, you cannot
test for equality. Instead, you will need to test if the value you have is in the range of, say, 99.9999 and 100.0001.
Several classes and methods within the java core library will help you with the rounding you may need to do.