It turns out that yes, 4.0F/3.0F should be exactly the same in any Java implementation - but there are other cases where similar expressions are not so bound. It depends on whether a given expression is considered FP-strict or not. (Any compile-time constant expression is FP-strict). From the
JLS:
Within an FP-strict expression, all intermediate values must be elements of the float value set or the double value set, implying that the results of all FP-strict expressions must be those predicted by IEEE 754 arithmetic on operands represented using single and double formats. Within an expression that is not FP-strict, some leeway is granted for an implementation to use an extended exponent range to represent intermediate results; the net effect, roughly speaking, is that a calculation might produce "the correct answer" in situations where exclusive use of the float value set or double value set might result in overflow or underflow.
I'm not sure what would be a good example of an expression that can evaluate differently in a non-FP-strict context. But it seems there's at least a possibility of different results...