You have a problem with floating point precision. If you run your code through the debugger probably the value which is calculated is not exactly 0.8, but something like e.g: 0.79999999999999785
You could try to define a threshold in your condition so that it breaks the loop. Here is an example how you can do it:
double math = 5.0;
double delta = 0.001;
while (true) {
if (math > 0.8 - delta && math < 0.8 + delta)
break;
math -= 0.2;
System.out.println(math);
}
System.out.println("Your math value is done.");
Rounding errors are a "feature" of floating point arithmetic in computers. See section on rounding errors in this article.