code: public static float max(float a, float b) {
          if (a != a)
              return a;   // a is NaN
          if ((a == 0.0f) &&
              (b == 0.0f) &&
              (Float.floatToRawIntBits(a) == negativeZeroFloatBits)) {
              // Raw conversion ok since NaN can't map to -0.0.
              return b;
          }
          return (a >= b) ? a : b;
      }
docs: Returns the greater of two {@code float} values.  That is,
  the result is the argument closer to positive infinity. If the
  arguments have the same value, the result is that same
  value. If either value is NaN, then the result is NaN.  Unlike
  the numerical comparison operators, this method considers
  negative zero to be strictly smaller than positive zero. If one
  argument is positive zero and the other negative zero, the
  result is positive zero.
  
  @param   a   an argument.
  @param   b   another argument.
  @return  the larger of {@code a} and {@code b}.