code: public static float nextUpF(float f) {
          if (Float.isNaN(f) || f == Float.POSITIVE_INFINITY) {
              return f;
          } else {
              f += 0.0f;
              return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f >= 0.0f) ? +1 : -1));
          }
      }
docs: Returns next bigger float value considering precision of the argument.