On the JVM, does division between two double values always yield the same exact result as doing the integer division?
With the following prerequisites:
- Division without remainder
- No division by zero
- Both
x
andy
actually hold integer values.
E.g. in the following code
double x = ...;
int resultInt = ...;
double y = x * resultInt;
double resultDouble = y / x; // double division
does resultDouble
always equal resultInt
or could there be some loss of precision?