If your question is about to simplify the first if condition and your goal is to check if the output is less than or equal 0.4999999999999999999999, you can easily write
if(output < 0.5)
System.out.println("покришка");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…