I have this code:
try {
Ciocco_V.tot = Double.parseDouble(Et444Tot.getText().toString());
} catch (NumberFormatException e) {
e.printStackTrace();
}
try {
Ciocco_V.burro = Double.parseDouble(Et111Burro.getText().toString());
} catch (NumberFormatException e) {
e.printStackTrace();
}
try {
Ciocco_V.fibra = Double.parseDouble(Et222Fibra.getText().toString());
} catch (NumberFormatException e) {
e.printStackTrace();
}
and inside the edittex there are this number:
44.2(burro) and 40.6(fibra) 84.8(tot)
if (((Ciocco_V.burro + Ciocco_V.fibra) != Ciocco_V.tot ) {
//fail condition
} else {
// correct
}
if I inspect the condition Ciocco_V.burro + Ciocco_V.fibra return this value: 84.80000000000001 and my IF fail.... why?