code: public static double format(double value) {
          if (value == Double.MAX_VALUE) {
              return value;
          }
  
          long factor = (long) Math.pow(10, 2);
          value = value * factor;
          double tmp = Math.floor(value);
          return tmp / factor;
      }
docs: Format the value to be something less problematic.
  Example: 50.00999999995 will become 50.00
  
  @param value The double to format
  @return The formatted double