Fix bug in Float.intBitsToFloat

This commit is contained in:
konsoletyper 2014-11-04 19:33:01 +03:00
parent 3a0db006bb
commit ed6e6ae373

View File

@ -277,7 +277,7 @@ public class TFloat extends TNumber implements TComparable<TFloat> {
} }
} }
boolean negative = (bits & (1 << 31)) != 0; boolean negative = (bits & (1 << 31)) != 0;
int rawExp = ((bits >> 23) & 0x7F8) - 127; int rawExp = (bits >> 23) & 0xFF;
int mantissa = bits & 0x7FFFFF; int mantissa = bits & 0x7FFFFF;
if (rawExp == 0) { if (rawExp == 0) {
mantissa <<= 1; mantissa <<= 1;