I notice some issues with the Java float precision
Float.parseFloat(\"0.0065\") - 0.001 // 0.0055000000134110451 new Float(\"0.027\") - 0.001
Floating point cannot accurately represent decimal numbers. If you need an accurate representation of a number in Java, you should use the java.math.BigDecimal class:
BigDecimal d = new BigDecimal("0.0065");