float result = (float) (Math.round (result * 10)) / 10;要是保留两位:10 --> 100, 以此类推.