I have a
private static final BigDecimal sd = new BigDecimal(0.7d);
Use a String literal:
private static final BigDecimal sd = new BigDecimal("0.7");
If you use a
public BigDecimal(double val) is called. The reason you do not get 0.7 is that it cannot be exactly represented by a
double. See the linked JavaDoc for more information.