If the type of an expression is
double, then there is a question as to what value set (§4.2.3) the value of the expression is drawn from. This is governed by the rules of value set conversion (§5.1.13); these rules in turn depend on whether or not the expression is FP-strict.
Every compile-time constant expression (§15.28) is FP-strict.
If an expression is not a compile-time constant expression, then consider all the class declarations, interface declarations, and method declarations that contain the expression. If any such declaration bears the
strictfp modifier (§188.8.131.52, §184.108.40.206, §220.127.116.11), then the expression is FP-strict.
If a class, interface, or method, X, is declared
strictfp, then X and any class, ...