Java strictfp Modifier

Strictly Processing Floating-Point Numbers with the strictfp Modifier

The strictfp modifier is a keyword that strictly processes floating-point numbers according to the rules defined by the IEEE 754 standard.

If the strictfp modifier is not specified, which is the default, Java calculates floating-point numbers using CPU features. In that case, the code runs quickly, but depending on the environment, slight differences may occur in calculation results.

strictfp double val;