Float.floatToIntBits

Float.floatToIntBits

Class Overview | Class Members | This Package | All Packages

Syntax
public static native int floatToIntBits( float value )
Parameters
value
a floating-point number.
Returns
the bits that represent the floating-point number.
Description
Returns the bit represention of a single-float value. The result is a representation of the floating-point argument according to the IEEE 754 floating-point "single precision" bit layout.

Bit 31 represents the sign of the floating-point number. Bits 30-23 represent the exponent. Bits 22-0 represent the significand (sometimes called the mantissa) of the floating-point number.

If the argument is positive infinity, the result is 0x7f800000.

If the argument is negative infinity, the result is 0xff800000.

If the argument is NaN, the result is 0x7fc00000.