private static double nextUp(double val) {
    // Math.nextUp returns MIN_VALUE for -0.0. This is suitable for relations
    // (see fromRelation) but not suitable for inverted range boundary
    if (Double.compare(val, -0.0) == 0) {
      return 0.0;
    }
    return Math.nextUp(val);
  }
private static double nextUp(double val)