(float value)
| 99 | } |
| 100 | |
| 101 | public static int floatToIntBits(float value) { |
| 102 | int result = floatToRawIntBits(value); |
| 103 | |
| 104 | // Check for NaN based on values of bit fields, maximum |
| 105 | // exponent and nonzero significand. |
| 106 | if (((result & EXP_BIT_MASK) == EXP_BIT_MASK) && (result & SIGNIF_BIT_MASK) != 0) { |
| 107 | result = 0x7fc00000; |
| 108 | } |
| 109 | return result; |
| 110 | } |
| 111 | |
| 112 | public static native int floatToRawIntBits(float value); |
| 113 |