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