public class TestDoublePrecision {
    public static void main(String[] args) {
	for (long l = Long.MAX_VALUE; l != Long.MIN_VALUE; --l) {
	    double d = (double)l;
	    long check = (long)d;

	    if (check != l)
		System.out.println("Mismatch: " + l + " => " + d + " => " + check);
	}
    }
}
