List of utility methods to do Float to Bit
int | floatToIntBits(final float f) Returns the representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout, after first mapping -0.0 to 0.0. return ((f == 0.0f) ? 0 : Float.floatToIntBits(f));
|
int | floatToIntBits(float value) float To Int Bits if (Float.isNaN(value)) { return 0x7fc00000; int signBit; if (value == 0) { return (1 / value == Float.NEGATIVE_INFINITY) ? 0x80000000 : 0; } else if (value < 0) { value = -value; ... |
int | floatToIntBits(float value) float To Int Bits return Float.floatToIntBits(value);
|
short | floatToShortBits(float fval) float To Short Bits int fbits = Float.floatToIntBits(fval); int sign = fbits >>> 16 & 0x8000; int val = (fbits & 0x7fffffff) + 0x1000; if (val >= 0x47800000) { if ((fbits & 0x7fffffff) >= 0x47800000) { if (val < 0x7f800000) return (short) (sign | 0x7c00); return (short) (sign | 0x7c00 | (fbits & 0x007fffff) >>> 13); ... |