I'm not sure about the details about why it works in some of your cases and not others, but i wouldn't ever count on it working.
Most high-level languages follow the IEEE standard on floats. I've never read it, but it basically defines how they should work.
I would not bet the farm on your examples still evaluating true/false the same with other computations, so I think your idea of comparing within a certain delta is probably the right way to go in Java, too.
Never ascribe to malice that which can be adequately explained by stupidity.