public static float abs (float a)

Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:

Parameters:
a    the argument whose absolute value is to be determined

Returns:  the absolute value of the argument.

@apiNote As implied by the above, one valid implementation of this method is given by the expression below which computes a float with the same exponent and significand as the argument but with a guaranteed zero sign bit indicating a positive value:
Float.intBitsToFloat(0x7fffffff & Float.floatToRawIntBits(a))