double sd = (double)8/(double)261;
BigDecimal bgitem = BigDecimal.valueOf(sd);
double fitem = Math.round(bgitem.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue()10000)0.01 ;
DecimalFormat df = new DecimalFormat("######0.00");
String st = df.format(fitem);
标签:Bigdecimal,double,fitem,bgitem,DecimalFormat,精度,BigDecimal
From: https://www.cnblogs.com/heavenTang/p/17445418.html