use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromLongTest method testRandom.
@Test
public void testRandom() {
LLVM80BitFloat val = LLVM80BitFloat.fromLong(5467892342341L);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x4029, 0x9f22f8fbc8a00000L);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedIntTest method testMaxValue.
@Test
public void testMaxValue() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedInt(Integer.MAX_VALUE);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x401d, 0xfffffffe00000000L);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedIntTest method testMinusOne.
@Test
public void testMinusOne() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedInt(-1);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x401e, 0xffffffff00000000L);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedIntTest method testZero.
@Test
public void testZero() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedInt(0);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0, 0);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedLongTest method testHighNegative.
@Test
public void testHighNegative() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedLong(1L << 63);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x403e, 0x8000000000000000L);
assertEquals(expected, val);
}
Aggregations