/**
* parse double f to num decimals
* @param f
* @param num the decimal number
* @return the format number
*/
public double decimalNum(double f, int num) {
BigDecimal bg = new BigDecimal(f);
double f1 = bg.setScale(num, BigDecimal.ROUND_HALF_UP).doubleValue();
return f1;
}