diff --git a/test/Floats.java b/test/Floats.java index 2494088b01..775b391ffd 100644 --- a/test/Floats.java +++ b/test/Floats.java @@ -211,7 +211,8 @@ public class Floats { double d = (double) z; expect(d == 12345.0); } - + + // Test floatToIntBits { int orig = 0x7f800001; float NaN = Float.intBitsToFloat(orig); @@ -220,6 +221,14 @@ public class Floats { expect(result == expected); } + { + int orig = 0x7f801001; + float NaN = Float.intBitsToFloat(orig); + int result = Float.floatToIntBits(NaN); + int expected = 0x7fc00000; + expect(result == expected); + } + { int orig = 0x00800001; float number = Float.intBitsToFloat(orig);