Yes, ofcourse it's possible to loose precision. Floating-point types such as float
and double
are not infinitely precise.
double d = 123456789.0;
System.out.println(d);
d = 1 / d;
d = 1 / d;
System.out.println(d);
output:
1.23456789E8
1.2345678899999999E8