code: public static double round(double value, int accuracy) {
  		double factor = Math.pow(10.0, accuracy);
  		return Math.round(value * factor) / factor;
  	}
docs: This method is used for arbitrary accuracy rounding.
  
  @param value
  is the value to be rounded.
  @param accuracy
  is the accuracy of the requested rounding. A value greater 0
  is the number of digits after the decimal sign. A value less
  than 0 rounds the number of digits before the decimal sign to
  zero.
  @return The rounded value is returned.