FloatingPointLiteralPrecision
Floating point literal loses precision

Severity
WARNING
Tags
Style
Has Fix?
REQUIRES_HUMAN_ATTENTION

The problem

double and float literals that can’t be precisely represented should be avoided.

Example:

double d = 1.9999999999999999999999999999999;
System.err.println(d); // prints 2.0

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("FloatingPointLiteralPrecision") to the enclosing element.