As far as I understand, strictfp limited to the area marked with this keyword. This means that this leads to the fact that the calculations of the marked class or method are carried over.
It cannot extend the effect to the specified code. For example, if foo() is strictfp , but calls bar() from another class that is not strictfp , the calculations inside bar() will not be portable, but the calculations inside foo() will be. So, if the results of bar() are used in foo() , the overall result may not be portable.
public strictfp double foo() { return bar() * 3.1415926; } public double bar() { return 2.718281828 * 2.0; }
This result 2.718281828 * 2.0 not portable, but its multiplication by 3.1415926 is.
Alexr source share