public static float nextUp(final float start){
  if (start < Float.POSITIVE_INFINITY) {
    final int bits=Float.floatToRawIntBits(start + 0.0f);
    return Float.intBitsToFloat(bits + (bits >= 0 ? 1 : -1));
  }
 else   if (start == Float.POSITIVE_INFINITY) {
    return Float.POSITIVE_INFINITY;
  }
 else {
    return start;
  }
}

public static float nextUp ( final float start ) { if ( start < Float . POSITIVE_INFINITY ) { final int bits = Float . floatToRawIntBits ( start + 0.0f ) ; return Float . intBitsToFloat ( bits + ( bits >= 0 ? 1 : - 1 ) ) ; } else if ( start == Float . POSITIVE_INFINITY ) { return Float . POSITIVE_INFINITY ; } else { return start ; } }
semantically equivalent to nextafter ( start , double . positive_infinity ) .
