code: public static double round(double value, int exponent) {
          double factor = Math.pow(10, exponent);
          return Math.round(value * factor) / factor;
      }
docs: Round the value to the specified exponent