Home
last modified time | relevance | path

Searched refs:result (Results 1 – 25 of 626) sorted by relevance

12345678910>>...26

/libcore/benchmarks/src/benchmarks/regression/
DMathBenchmark.java35 double result = d; in timeAbsD() local
37 result = Math.abs(d); in timeAbsD()
39 return result; in timeAbsD()
43 float result = f; in timeAbsF() local
45 result = Math.abs(f); in timeAbsF()
47 return result; in timeAbsF()
51 int result = i; in timeAbsI() local
53 result = Math.abs(i); in timeAbsI()
55 return result; in timeAbsI()
59 long result = l; in timeAbsL() local
[all …]
DIntConstantMultiplicationBenchmark.java21 int result = 1; in timeMultiplyIntByConstant6() local
23 result *= 6; in timeMultiplyIntByConstant6()
25 return result; in timeMultiplyIntByConstant6()
28 int result = 1; in timeMultiplyIntByConstant7() local
30 result *= 7; in timeMultiplyIntByConstant7()
32 return result; in timeMultiplyIntByConstant7()
35 int result = 1; in timeMultiplyIntByConstant8() local
37 result *= 8; in timeMultiplyIntByConstant8()
39 return result; in timeMultiplyIntByConstant8()
42 int result = 1; in timeMultiplyIntByConstant8_Shift() local
[all …]
DIntConstantDivisionBenchmark.java21 int result = 1; in timeDivideIntByConstant2() local
23 result /= 2; in timeDivideIntByConstant2()
25 return result; in timeDivideIntByConstant2()
28 int result = 1; in timeDivideIntByConstant8() local
30 result /= 8; in timeDivideIntByConstant8()
32 return result; in timeDivideIntByConstant8()
35 int result = 1; in timeDivideIntByConstant10() local
37 result /= 10; in timeDivideIntByConstant10()
39 return result; in timeDivideIntByConstant10()
42 int result = 1; in timeDivideIntByConstant100() local
[all …]
DIntConstantRemainderBenchmark.java21 int result = 1; in timeRemainderIntByConstant2() local
23 result %= 2; in timeRemainderIntByConstant2()
25 return result; in timeRemainderIntByConstant2()
28 int result = 1; in timeRemainderIntByConstant8() local
30 result %= 8; in timeRemainderIntByConstant8()
32 return result; in timeRemainderIntByConstant8()
51 int result = 1; in timeRemainderIntByConstant2048() local
53 result %= 2048; in timeRemainderIntByConstant2048()
55 return result; in timeRemainderIntByConstant2048()
58 int result = 1; in timeRemainderIntByVariable2() local
[all …]
DFloatBenchmark.java24 int result = 123; in timeFloatToIntBits() local
26 result = Float.floatToIntBits(f); in timeFloatToIntBits()
28 if (result != i) { in timeFloatToIntBits()
29 throw new RuntimeException(Integer.toString(result)); in timeFloatToIntBits()
34 int result = 123; in timeFloatToRawIntBits() local
36 result = Float.floatToRawIntBits(f); in timeFloatToRawIntBits()
38 if (result != i) { in timeFloatToRawIntBits()
39 throw new RuntimeException(Integer.toString(result)); in timeFloatToRawIntBits()
44 float result = 123.0f; in timeIntBitsToFloat() local
46 result = Float.intBitsToFloat(i); in timeIntBitsToFloat()
[all …]
DDoubleBenchmark.java24 long result = 123; in timeDoubleToLongBits() local
26 result = Double.doubleToLongBits(d); in timeDoubleToLongBits()
28 if (result != l) { in timeDoubleToLongBits()
29 throw new RuntimeException(Long.toString(result)); in timeDoubleToLongBits()
34 long result = 123; in timeDoubleToRawLongBits() local
36 result = Double.doubleToRawLongBits(d); in timeDoubleToRawLongBits()
38 if (result != l) { in timeDoubleToRawLongBits()
39 throw new RuntimeException(Long.toString(result)); in timeDoubleToRawLongBits()
44 double result = 123.0; in timeLongBitsToDouble() local
46 result = Double.longBitsToDouble(l); in timeLongBitsToDouble()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalConvertTest.java39 double result = -1.2380964839238476E53; in testDoubleValueNeg() local
40 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValueNeg()
49 double result = 1.2380964839238476E53; in testDoubleValuePos() local
50 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValuePos()
59 double result = Double.POSITIVE_INFINITY; in testDoubleValuePosInfinity() local
60 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValuePosInfinity()
69 double result = Double.NEGATIVE_INFINITY; in testDoubleValueNegInfinity() local
70 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValueNegInfinity()
80 double result = aNumber.doubleValue(); in testDoubleValueMinusZero() local
81 assertTrue("incorrect value", Double.doubleToLongBits(result) == minusZero); in testDoubleValueMinusZero()
[all …]
DBigIntegerOperateBitsTest.java148 BigInteger result = aNumber.clearBit(number); in testClearBitZero() local
150 resBytes = result.toByteArray(); in testClearBitZero()
154 assertEquals("incorrect sign", 0, result.signum()); in testClearBitZero()
166 BigInteger result = aNumber.clearBit(number); in testClearBitZeroOutside1() local
168 resBytes = result.toByteArray(); in testClearBitZeroOutside1()
172 assertEquals("incorrect sign", 0, result.signum()); in testClearBitZeroOutside1()
184 BigInteger result = aNumber.clearBit(number); in testClearBitNegativeInside1() local
186 resBytes = result.toByteArray(); in testClearBitNegativeInside1()
190 assertEquals("incorrect sign", -1, result.signum()); in testClearBitNegativeInside1()
202 BigInteger result = aNumber.clearBit(number); in testClearBitNegativeInside2() local
[all …]
DBigDecimalArithmeticTest.java44 BigDecimal result = aNumber.add(bNumber); in testAddEqualScalePosPos() local
45 assertEquals("incorrect value", c, result.toString()); in testAddEqualScalePosPos()
46 assertEquals("incorrect scale", cScale, result.scale()); in testAddEqualScalePosPos()
62 BigDecimal result = aNumber.add(bNumber, mc); in testAddMathContextEqualScalePosPos() local
63 assertEquals("incorrect value", c, result.toString()); in testAddMathContextEqualScalePosPos()
64 assertEquals("incorrect scale", cScale, result.scale()); in testAddMathContextEqualScalePosPos()
79 BigDecimal result = aNumber.add(bNumber); in testAddEqualScaleNegNeg() local
80 assertEquals("incorrect value", c, result.toString()); in testAddEqualScaleNegNeg()
81 assertEquals("incorrect scale", cScale, result.scale()); in testAddEqualScaleNegNeg()
97 BigDecimal result = aNumber.add(bNumber, mc); in testAddMathContextEqualScaleNegNeg() local
[all …]
DBigIntegerAddTest.java42 BigInteger result = aNumber.add(bNumber); in testCase1() local
44 resBytes = result.toByteArray(); in testCase1()
48 assertEquals("incorrect sign", 1, result.signum()); in testCase1()
62 BigInteger result = aNumber.add(bNumber); in testCase2() local
64 resBytes = result.toByteArray(); in testCase2()
68 assertEquals("incorrect sign", -1, result.signum()); in testCase2()
84 BigInteger result = aNumber.add(bNumber); in testCase3() local
86 resBytes = result.toByteArray(); in testCase3()
90 assertEquals("incorrect sign", 1, result.signum()); in testCase3()
106 BigInteger result = aNumber.add(bNumber); in testCase4() local
[all …]
DBigIntegerAndTest.java42 BigInteger result = aNumber.and(bNumber); in testZeroPos() local
44 resBytes = result.toByteArray(); in testZeroPos()
48 assertEquals("incorrect sign", 0, result.signum()); in testZeroPos()
62 BigInteger result = aNumber.and(bNumber); in testZeroNeg() local
64 resBytes = result.toByteArray(); in testZeroNeg()
68 assertEquals("incorrect sign", 0, result.signum()); in testZeroNeg()
82 BigInteger result = aNumber.and(bNumber); in testPosZero() local
84 resBytes = result.toByteArray(); in testPosZero()
88 assertEquals("incorrect sign", 0, result.signum()); in testPosZero()
102 BigInteger result = aNumber.and(bNumber); in testNegPos() local
[all …]
DBigIntegerSubtractTest.java43 BigInteger result = aNumber.subtract(bNumber); in testCase1() local
45 resBytes = result.toByteArray(); in testCase1()
49 assertEquals(1, result.signum()); in testCase1()
64 BigInteger result = aNumber.subtract(bNumber); in testCase2() local
66 resBytes = result.toByteArray(); in testCase2()
70 assertEquals(-1, result.signum()); in testCase2()
86 BigInteger result = aNumber.subtract(bNumber); in testCase3() local
88 resBytes = result.toByteArray(); in testCase3()
92 assertEquals(1, result.signum()); in testCase3()
108 BigInteger result = aNumber.subtract(bNumber); in testCase4() local
[all …]
DBigIntegerDivideTest.java74 BigInteger result = aNumber.divide(bNumber); in testCase3() local
76 resBytes = result.toByteArray(); in testCase3()
80 assertEquals("incorrect sign", 1, result.signum()); in testCase3()
94 BigInteger result = aNumber.divide(bNumber); in testCase4() local
96 resBytes = result.toByteArray(); in testCase4()
100 assertEquals("incorrect sign", -1, result.signum()); in testCase4()
115 BigInteger result = aNumber.divide(bNumber); in testCase5() local
117 resBytes = result.toByteArray(); in testCase5()
121 assertEquals("incorrect sign", 0, result.signum()); in testCase5()
136 BigInteger result = aNumber.divide(bNumber); in testCase6() local
[all …]
DBigIntegerConvertTest.java37 double result = 0.0; in testDoubleValueZero() local
39 assertTrue(aNumber == result); in testDoubleValueZero()
48 double result = 2.7467238945E10; in testDoubleValuePositive1() local
50 assertTrue(aNumber == result); in testDoubleValuePositive1()
59 double result = 2.7467238945723645E36; in testDoubleValuePositive2() local
61 assertTrue(aNumber == result); in testDoubleValuePositive2()
70 double result = -2.7467238945E10; in testDoubleValueNegative1() local
72 assertTrue(aNumber == result); in testDoubleValueNegative1()
81 double result = -2.7467238945723645E36; in testDoubleValueNegative2() local
83 assertTrue(aNumber == result); in testDoubleValueNegative2()
[all …]
DBigIntegerToStringTest.java39 String result = aNumber.toString(45); in testRadixOutOfRange() local
40 assertTrue(result.equals(value)); in testRadixOutOfRange()
50 String result = aNumber.toString(radix); in testRadix2Neg() local
51 assertTrue(result.equals(value)); in testRadix2Neg()
61 String result = aNumber.toString(radix); in testRadix2Pos() local
62 assertTrue(result.equals(value)); in testRadix2Pos()
72 String result = aNumber.toString(radix); in testRadix10Neg() local
73 assertTrue(result.equals(value)); in testRadix10Neg()
83 String result = aNumber.toString(radix); in testRadix10Pos() local
84 assertTrue(result.equals(value)); in testRadix10Pos()
[all …]
DBigIntegerMultiplyTest.java42 BigInteger result = aNumber.multiply(bNumber); in testCase1() local
44 resBytes = result.toByteArray(); in testCase1()
48 assertEquals("incorrect sign", 1, result.signum()); in testCase1()
63 BigInteger result = aNumber.multiply(bNumber); in testCase2() local
65 resBytes = result.toByteArray(); in testCase2()
69 assertEquals("incorrect sign", -1, result.signum()); in testCase2()
85 BigInteger result = aNumber.multiply(bNumber); in testCase3() local
87 resBytes = result.toByteArray(); in testCase3()
91 assertEquals("incorrect sign", 1, result.signum()); in testCase3()
107 BigInteger result = aNumber.multiply(bNumber); in testCase4() local
[all …]
/libcore/benchmarks/src/benchmarks/
DAdditionBenchmark.java24 int result = 0; in timeAddConstantToLocalInt() local
26 result += 123; in timeAddConstantToLocalInt()
28 return result; in timeAddConstantToLocalInt()
31 int result = 0; in timeAddTwoLocalInts() local
34 result += constant; in timeAddTwoLocalInts()
36 return result; in timeAddTwoLocalInts()
39 long result = 0; in timeAddConstantToLocalLong() local
41 result += 123L; in timeAddConstantToLocalLong()
43 return result; in timeAddConstantToLocalLong()
46 long result = 0; in timeAddTwoLocalLongs() local
[all …]
DFieldAccessBenchmark.java34 int result = 0; in timeField() local
36 result = intVal; in timeField()
38 return result; in timeField()
41 int result = 0; in timeFieldFinal() local
43 result = finalIntVal; in timeFieldFinal()
45 return result; in timeFieldFinal()
48 int result = 0; in timeFieldStatic() local
50 result = staticIntVal; in timeFieldStatic()
52 return result; in timeFieldStatic()
55 int result = 0; in timeFieldStaticFinal() local
[all …]
DMultiplicationBenchmark.java24 int result = 1; in timeMultiplyIntByConstant10() local
26 result *= 10; in timeMultiplyIntByConstant10()
28 return result; in timeMultiplyIntByConstant10()
31 int result = 1; in timeMultiplyIntByConstant8() local
33 result *= 8; in timeMultiplyIntByConstant8()
35 return result; in timeMultiplyIntByConstant8()
38 int result = 1; in timeMultiplyIntByVariable10() local
41 result *= factor; in timeMultiplyIntByVariable10()
43 return result; in timeMultiplyIntByVariable10()
46 int result = 1; in timeMultiplyIntByVariable8() local
[all …]
/libcore/ojluni/src/main/java/java/util/
DEnumSet.java130 EnumSet<E> result = noneOf(elementType); in allOf() local
131 result.addAll(); in allOf()
132 return result; in allOf()
176 EnumSet<E> result = EnumSet.of(first); in copyOf() local
178 result.add(i.next()); in copyOf()
179 return result; in copyOf()
194 EnumSet<E> result = copyOf(s); in complementOf() local
195 result.complement(); in complementOf()
196 return result; in complementOf()
214 EnumSet<E> result = noneOf(e.getDeclaringClass()); in of() local
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DListResourceBundleTest.java36 Vector<String> result = new Vector<String>(); in test_getKeys() local
38 result.addElement(keys.nextElement()); in test_getKeys()
40 assertTrue("Missing key parent1", result.contains("parent1")); in test_getKeys()
41 assertTrue("Missing key parent2", result.contains("parent2")); in test_getKeys()
42 assertTrue("Missing key parent3", result.contains("parent3")); in test_getKeys()
43 assertTrue("Missing key parent4", result.contains("parent4")); in test_getKeys()
44 assertTrue("Missing key child1", result.contains("child1")); in test_getKeys()
45 assertTrue("Missing key child2", result.contains("child2")); in test_getKeys()
46 assertTrue("Missing key child3", result.contains("child3")); in test_getKeys()
56 Vector result = new Vector(); in test_handleGetObjectLjava_lang_String() local
[all …]
/libcore/luni/src/test/java/tests/java/sql/
DMultiThreadAccessTest.java163 ResultSet result = statement.executeQuery(selectQuery + id1); in test_MultipleOperationsInSeveralTables() local
164 assertFalse("The record was not deleted", result.next()); in test_MultipleOperationsInSeveralTables()
166 result = statement.executeQuery(selectQuery + id2); in test_MultipleOperationsInSeveralTables()
167 assertTrue("The record was not inserted", result.next()); in test_MultipleOperationsInSeveralTables()
170 + id2, result.getString("field1")); in test_MultipleOperationsInSeveralTables()
172 assertEquals("Wrong value of field2", Integer.valueOf(id2).intValue(), result in test_MultipleOperationsInSeveralTables()
174 assertEquals("Wrong value of field3", Integer.valueOf(id2).intValue(), result in test_MultipleOperationsInSeveralTables()
176 result.close(); in test_MultipleOperationsInSeveralTables()
178 result = statement.executeQuery(selectQuery + oldID); in test_MultipleOperationsInSeveralTables()
179 assertFalse("The record was not deleted", result.next()); in test_MultipleOperationsInSeveralTables()
[all …]
DSelectFunctionalityTest.java132 ResultSet result = statement.executeQuery(sql); in test_SelectSimple() local
135 while (result.next()) { in test_SelectSimple()
136 int id = result.getInt("finteger"); in test_SelectSimple()
138 DatabaseCreator.defaultString + id, result in test_SelectSimple()
141 DatabaseCreator.defaultCharacter + id, result in test_SelectSimple()
152 .valueOf(id + 0.1).floatValue(), result.getFloat("ffloat")); in test_SelectSimple()
154 .valueOf(id + 0.1).doubleValue(), result.getDouble("freal")); in test_SelectSimple()
156 .valueOf(id + 0.1).doubleValue(), result in test_SelectSimple()
159 date.toString(), result.getDate("fdate").toString()); in test_SelectSimple()
161 time.toString(), result.getTime("ftime").toString()); in test_SelectSimple()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java68 Number result = form.parse("123.123"); in test_parse_bigDecimal() local
69 assertEquals(new BigDecimal("123.123"), result); in test_parse_bigDecimal()
74 result = form.parse("123.123"); in test_parse_bigDecimal()
75 assertFalse(result instanceof BigDecimal); in test_parse_bigDecimal()
84 Number result = format.parse("123.123"); in test_parse_integerOnly() local
85 assertEquals(new Long("123"), result); in test_parse_integerOnly()
89 result = format.parse("123.123"); in test_parse_integerOnly()
90 assertEquals(new Double("123.123"), result); in test_parse_integerOnly()
379 BigDecimal result = (BigDecimal) number; in test_parse_largeBigDecimal() local
381 result); in test_parse_largeBigDecimal()
[all …]
/libcore/luni/src/main/native/
Dcbigint.cpp158 uint32_t * result) in simpleMultiplyAddHighPrecision() argument
171 HIGH_IN_U64 (product) + result[resultIndex] + in simpleMultiplyAddHighPrecision()
173 result[resultIndex] = LOW_U32_FROM_VAR (product); in simpleMultiplyAddHighPrecision()
176 HIGH_IN_U64 (product) + result[resultIndex] + in simpleMultiplyAddHighPrecision()
178 result[resultIndex] = LOW_U32_FROM_VAR (product); in simpleMultiplyAddHighPrecision()
183 result[resultIndex] += HIGH_U32_FROM_VAR (product); in simpleMultiplyAddHighPrecision()
184 if (result[resultIndex] < HIGH_U32_FROM_VAR (product)) in simpleMultiplyAddHighPrecision()
188 while (++result[resultIndex] == 0) in simpleMultiplyAddHighPrecision()
195 uint64_t * result, int32_t length) in multiplyHighPrecision() argument
212 memset (result, 0, sizeof (uint64_t) * length); in multiplyHighPrecision()
[all …]

12345678910>>...26