use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromDoubleTest method testRandomNumber1.
@Test
public void testRandomNumber1() {
LLVM80BitFloat val = LLVM80BitFloat.fromDouble(123.436789);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x4005, 0xf6dfa2cecc815000L);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromDoubleTest method testMinusZero1.
@Test
public void testMinusZero1() {
LLVM80BitFloat val = LLVM80BitFloat.fromDouble(-0.0);
assertEquals(minusZero(), val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromIntTest method testPositiveInfinity.
@Test
public void testPositiveInfinity() {
LLVM80BitFloat test = LLVM80BitFloat.fromRawValues(false, 0b111111111111111, 1L << 63);
assertTrue(test.isPositiveInfinity());
assertTrue(test.isInfinity());
assertFalse(test.isNegativeInfinity());
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromIntTest method testMaxInt.
@Test
public void testMaxInt() {
LLVM80BitFloat val = LLVM80BitFloat.fromInt(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 LLVM80BitFromIntTest method testNegativeInfinity.
@Test
public void testNegativeInfinity() {
LLVM80BitFloat test = LLVM80BitFloat.fromRawValues(true, 0b111111111111111, 1L << 63);
assertTrue(test.isNegativeInfinity());
assertTrue(test.isInfinity());
assertFalse(test.isPositiveInfinity());
}
Aggregations