Note | ||
---|---|---|
| ||
This rule may be deprecated and replaced by a similar guideline. 06/28/2014 -- Version 1.0 |
The Java language allows platforms to use available floating-point hardware that can provide extended floating-point support with exponents that contain more bits than the standard Java primitive type double
(in the absence of the strictfp
modifier). Consequently, these platforms can represent a superset of the values that can be represented by the standard floating-point types. Floating-point computations on such platforms can produce different results than would be obtained if the floating-point computations were restricted to the standard representations of float
and double
. According to the JLS, §15.4, "FP-strict Expressions" [JLS 2005]:
...
FLP00-C. Understand the limitations of floating-point numbers | |
FLP00-CPP. Understand the limitations of floating-point numbers |
...
NUM05-J. Do not use denormalized numbers Rule 03. : Numeric Types and Operations (NUM)