Sometimes it is desired to obtain consistent results from floating point operations, across different JVMs and platforms. This guarantee is imposed by the strictfp
modifier which ensures . On the downside, it is more likely that intermediate operations do not result in arithmetic underflow or overflow commonly encountered while dealing with float
and double
typeswill overflow or underflow when strictfp
is used because the platform specific floating point behavior is disregarded. These issues are unavoidable when portability is the main concern. The strictfp
modifier can be used with a class, method or interface.
...