Skip to content

Instantly share code, notes, and snippets.

@ruimo
Created January 5, 2022 10:39
Show Gist options
  • Save ruimo/5ab5ade1f33a0a06800b1f2016ac1212 to your computer and use it in GitHub Desktop.
Save ruimo/5ab5ade1f33a0a06800b1f2016ac1212 to your computer and use it in GitHub Desktop.
public class Test {
public static void main(String... args) {
double i = 1.0d;
double d;
while (true) {
d = i / 2;
if (d * 2 != i)
throw new RuntimeException(d + " * 2 != " + i);
i = d;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment