src/main/java/com/rockagen/commons/util/Arith.java
public static float toFloat(final double d){
    	BigDecimal b = new BigDecimal(Double.toString(d));
    	return b.floatValue();
    }
public static float toFloat(final double d){
    	BigDecimal b = new BigDecimal(Double.toString(d));
    	return b.floatValue();
    }
to double
@param d double value
@return double