Lines Matching defs:Tuple
1898 class Tuple {
1905 public Tuple(int result, int value, int factor) {
1911 final Tuple[] TUPLES = new Tuple[] {
1913 new Tuple(0x00000000, 0x00000001, -1),
1915 new Tuple(0x00000002, 0x00000003, -1),
1917 new Tuple(0x00000001, 0x00000005, -3),
1919 new Tuple(0x00000002, 0x0000000d, -3),
1923 new Tuple(0x00000002, 0x01a00000, -24),
1925 new Tuple(0x00000004, 0x01e00000, -24),
1927 new Tuple(0x00000003, 0x01c80000, -24),
1929 new Tuple(0x00000004, 0x01e80000, -24),
1933 Tuple tuple = TUPLES[i];
1934 assertEquals(tuple.result, Float.floatToIntBits(Math.scalb(Float
1935 .intBitsToFloat(tuple.value), tuple.factor)));
1936 assertEquals(tuple.result, Float.floatToIntBits(-Math.scalb(-Float
1937 .intBitsToFloat(tuple.value), tuple.factor)));
1949 class Tuple {
1956 public Tuple(long result, long value, int factor) {
1962 final Tuple[] TUPLES = new Tuple[] {
1964 new Tuple(0x00000000L, 0x00000001L, -1),
1966 new Tuple(0x00000002L, 0x00000003L, -1),
1968 new Tuple(0x00000001L, 0x00000005L, -3),
1970 new Tuple(0x00000002L, 0x0000000dL, -3),
1974 new Tuple(0x0000000000000002L, 0x0034000000000000L, -53), // round to even
1975 new Tuple(0x0000000000000004L, 0x003c000000000000L, -53), // round to even
1976 new Tuple(0x0000000000000003L, 0x0035000000000000L, -53), // round to infinity
1977 new Tuple(0x0000000000000004L, 0x003d000000000000L, -53), // round to infinity
1980 Tuple tuple = TUPLES[i];
1981 assertEquals(tuple.result, Double.doubleToLongBits(Math.scalb(
1982 Double.longBitsToDouble(tuple.value), tuple.factor)));
1983 assertEquals(tuple.result, Double.doubleToLongBits(-Math.scalb(
1984 -Double.longBitsToDouble(tuple.value), tuple.factor)));