/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | DoubleTest.java | 190 result = Double.parseDouble(originalDoubleString); in doTestCompareRawBits() 191 rawBits = Double.doubleToLongBits(result); in doTestCompareRawBits() 192 convertedString = new Double(result).toString(); in doTestCompareRawBits() 199 assertEquals(answer, Double.toString(dd)); in test_toString() 200 Double d = new Double(dd); in test_toString() 201 assertEquals(answer, Double.toString(d.doubleValue())); in test_toString() 209 Double d = new Double(39089.88888888888888888888888888888888); in test_ConstructorD() 218 Double d = new Double("39089.88888888888888888888888888888888"); in test_ConstructorLjava_lang_String() 224 d = new Double("1E+-20"); in test_ConstructorLjava_lang_String() 231 …d = Double.parseDouble("-1.23399999999999996511673809963093681727585202138420992908181304283780288… in test_ConstructorLjava_lang_String() [all …]
|
D | MathTest.java | 80 long lr = Double.doubleToLongBits(r); in test_acosD() 81 long t = Double.doubleToLongBits(ADJ / HYP); in test_acosD() 92 long lr = Double.doubleToLongBits(r); in test_asinD() 93 long t = Double.doubleToLongBits(OPP / HYP); in test_asinD() 123 assertTrue(Double.isNaN(Math.cbrt(Double.NaN))); in test_cbrt_D() 124 assertEquals(Double.POSITIVE_INFINITY, Math.cbrt(Double.POSITIVE_INFINITY), 0D); in test_cbrt_D() 125 assertEquals(Double.NEGATIVE_INFINITY, Math.cbrt(Double.NEGATIVE_INFINITY), 0D); in test_cbrt_D() 126 assertEquals(Double.doubleToLongBits(0.0), Double.doubleToLongBits(Math.cbrt(0.0))); in test_cbrt_D() 127 assertEquals(Double.doubleToLongBits(+0.0), Double.doubleToLongBits(Math.cbrt(+0.0))); in test_cbrt_D() 128 assertEquals(Double.doubleToLongBits(-0.0), Double.doubleToLongBits(Math.cbrt(-0.0))); in test_cbrt_D() [all …]
|
D | StrictMathTest.java | 130 assertTrue("Should return Double.NaN", Double.isNaN(StrictMath in test_cbrt_D() 131 .cbrt(Double.NaN))); in test_cbrt_D() 133 Double.POSITIVE_INFINITY, StrictMath in test_cbrt_D() 134 .cbrt(Double.POSITIVE_INFINITY)); in test_cbrt_D() 136 Double.NEGATIVE_INFINITY, StrictMath in test_cbrt_D() 137 .cbrt(Double.NEGATIVE_INFINITY)); in test_cbrt_D() 138 assertEquals(Double.doubleToLongBits(0.0), Double in test_cbrt_D() 140 assertEquals(Double.doubleToLongBits(+0.0), Double in test_cbrt_D() 142 assertEquals(Double.doubleToLongBits(-0.0), Double in test_cbrt_D() 149 5.643803094122362E102, StrictMath.cbrt(Double.MAX_VALUE)); in test_cbrt_D() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | DoubleTest.java | 24 assertEquals("0.008", Double.toString(0.008)); in testDoubleToStringUnsignedDivide() 25 assertEquals("0.008366", Double.toString(0.008366)); in testDoubleToStringUnsignedDivide() 27 assertEquals("0.009", Double.toString(0.009)); in testDoubleToStringUnsignedDivide() 29 assertEquals("0.008567856012638986", Double.toString(0.008567856012638986)); in testDoubleToStringUnsignedDivide() 30 assertEquals("0.010206713752229896", Double.toString(0.010206713752229896)); in testDoubleToStringUnsignedDivide() 34 assertEquals(Double.NaN, Double.parseDouble("NaN")); in testNamedDoubles() 35 assertEquals(Double.NaN, Double.parseDouble("-NaN")); in testNamedDoubles() 36 assertEquals(Double.NaN, Double.parseDouble("+NaN")); in testNamedDoubles() 38 Double.parseDouble("NNaN"); in testNamedDoubles() 43 Double.parseDouble("NaNN"); in testNamedDoubles() [all …]
|
D | OldDoubleTest.java | 24 Double d = new Double(Byte.MAX_VALUE); in test_byteValue() 26 d= new Double(Byte.MIN_VALUE); in test_byteValue() 28 d= new Double(Double.MAX_VALUE); in test_byteValue() 33 assertEquals(0x7ff8000000000000L, Double.doubleToLongBits(Double.NaN)); in test_doubleToLongBitsD() 34 assertEquals(0x7ff0000000000000L, Double.doubleToLongBits(Double.POSITIVE_INFINITY)); in test_doubleToLongBitsD() 35 assertEquals(0xfff0000000000000L, Double.doubleToLongBits(Double.NEGATIVE_INFINITY)); in test_doubleToLongBitsD() 39 assertEquals(0x7ff8000000000000L, Double.doubleToLongBits(Double.NaN)); in test_doubleToRawLongBitsD() 40 assertEquals(0x7ff0000000000000L, Double.doubleToLongBits(Double.POSITIVE_INFINITY)); in test_doubleToRawLongBitsD() 41 assertEquals(0xfff0000000000000L, Double.doubleToLongBits(Double.NEGATIVE_INFINITY)); in test_doubleToRawLongBitsD() 45 assertEquals(Double.POSITIVE_INFINITY, new Double("1.7976931348623159E308").doubleValue()); in test_doubleValue() [all …]
|
D | OldAndroidStrictMathTest.java | 95 assertTrue("Should return Double.NaN", Double.isNaN(StrictMath in testCbrtD() 96 .cbrt(Double.NaN))); in testCbrtD() 98 Double.POSITIVE_INFINITY, StrictMath in testCbrtD() 99 .cbrt(Double.POSITIVE_INFINITY)); in testCbrtD() 101 Double.NEGATIVE_INFINITY, StrictMath in testCbrtD() 102 .cbrt(Double.NEGATIVE_INFINITY)); in testCbrtD() 103 assertEquals(Double.doubleToLongBits(0.0), Double in testCbrtD() 105 assertEquals(Double.doubleToLongBits(+0.0), Double in testCbrtD() 107 assertEquals(Double.doubleToLongBits(-0.0), Double in testCbrtD() 114 5.643803094122362E102, StrictMath.cbrt(Double.MAX_VALUE)); in testCbrtD() [all …]
|
D | OldAndroidMathTest.java | 86 long lr = Double.doubleToLongBits(r); in testAcosD() 87 long t = Double.doubleToLongBits(ADJ / HYP); in testAcosD() 95 long lr = Double.doubleToLongBits(r); in testAsinD() 96 long t = Double.doubleToLongBits(OPP / HYP); in testAsinD() 109 assertEquals("wrong atan(+INF)", PI / 2, Math.atan(Double.POSITIVE_INFINITY), 0); in testAtanD() 110 assertEquals("wrong atan(-INF)", -PI / 2, Math.atan(Double.NEGATIVE_INFINITY), 0); in testAtanD() 155 assertTrue("Should return Double.NaN", Double.isNaN(Math in testCbrtD() 156 .cbrt(Double.NaN))); in testCbrtD() 158 Double.POSITIVE_INFINITY, Math in testCbrtD() 159 .cbrt(Double.POSITIVE_INFINITY), 0D); in testCbrtD() [all …]
|
D | OldAndroidFloatDoubleTest.java | 27 Double d = Double.valueOf(1.0); in testFloatDouble() 98 double pzero = 1.0 / Double.POSITIVE_INFINITY; in testDouble() 99 double nzero = 1.0 / Double.NEGATIVE_INFINITY; in testDouble() 123 assertEquals(Double.valueOf(pz), Double.valueOf(pz)); in testDouble() 124 assertTrue(!Double.valueOf(pz).equals(Double.valueOf(nz))); in testDouble() 125 assertEquals(Double.valueOf(pz), Double.valueOf(pzero)); in testDouble() 126 assertTrue(!Double.valueOf(pz).equals(Double.valueOf(nzero))); in testDouble() 128 assertTrue(!Double.valueOf(nz).equals(Double.valueOf(pz))); in testDouble() 129 assertEquals(Double.valueOf(nz), Double.valueOf(nz)); in testDouble() 130 assertTrue(!Double.valueOf(nz).equals(Double.valueOf(pzero))); in testDouble() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ConcurrentModTest.java | 36 Double one = new Double(1.0); in testGet() 37 Double two = new Double(2.0); in testGet() 38 Double three = new Double(3.0); in testGet() 39 Double four = new Double(4.0); in testGet() 47 assertTrue(((Double) sub.get(1)).doubleValue() <= 3.0); in testGet() 48 assertTrue(((Double) sub.get(1)).doubleValue() > 2.0); in testGet() 80 Double one = new Double(1.0); in testSet() 81 Double two = new Double(2.0); in testSet() 82 Double three = new Double(3.0); in testSet() 83 Double four = new Double(4.0); in testSet() [all …]
|
D | Arrays2Test.java | 38 double[] specials = new double[] { Double.NEGATIVE_INFINITY, in test_binarySearch$DD() 39 -Double.MAX_VALUE, -2d, -Double.MIN_VALUE, -0d, 0d, in test_binarySearch$DD() 40 Double.MIN_VALUE, 2d, Double.MAX_VALUE, in test_binarySearch$DD() 41 Double.POSITIVE_INFINITY, Double.NaN }; in test_binarySearch$DD() 80 Arrays.fill(d, Double.MAX_VALUE); in test_equals$D$D() 81 Arrays.fill(x, Double.MIN_VALUE); in test_equals$D$D() 85 Arrays.fill(x, Double.MAX_VALUE); in test_equals$D$D() 92 Arrays.equals(new double[] { Double.NaN }, new double[] { Double.NaN })); in test_equals$D$D() 133 …le[] specials1 = new double[] { Double.NaN, Double.MAX_VALUE, Double.MIN_VALUE, 0d, -0d, Double.PO… in test_sort$D() 134 …pecials2 = new double[] { 0d, Double.POSITIVE_INFINITY, -0d, Double.NEGATIVE_INFINITY, Double.MIN_… in test_sort$D() [all …]
|
D | FormatterTest.java | 1156 { new Double(1.1d), "%3.2b", " tr", }, in test_format_LString$LObject_GeneralConversionB() 1157 { new Double(1.1d), "%-4.6b", "true", }, in test_format_LString$LObject_GeneralConversionB() 1158 { new Double(1.1d), "%.2b", "tr", }, in test_format_LString$LObject_GeneralConversionB() 1220 { new Double(1.1d), "%2.3s", "1.1", }, in test_format_LString$LObject_GeneralConversionS() 1221 { new Double(1.1d), "%-6.4s", "1.1 ", }, in test_format_LString$LObject_GeneralConversionS() 1222 { new Double(1.1d), "%.5s", "1.1", }, in test_format_LString$LObject_GeneralConversionS() 1270 new Double(1.1d), in test_format_LString$LObject_GeneralConversionH() 1313 new Double(1.1d), in test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversionOther() 1408 new Double(1.1d), "string content", new Float(1.1f), new Date() }; in test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion() 2885 { Double.MAX_VALUE, "%e", "1.797693e+308" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/function/ |
D | FunctionTest.java | 32 Function<Double, Double> plusOne = x -> x + 1.0d; in testCompose() 33 Function<Double, Double> twice = x -> 2 *x; in testCompose() 38 Function<Double, Double> plusOne = x -> x + 1.0d; in testCompose_null() 46 Function<Double, Double> plusOne = x -> x + 1.0d; in testAndThen() 47 Function<Double, Double> twice = x -> 2 *x; in testAndThen() 52 Function<Double, Double> plusOne = x -> x + 1.0d; in testAndThen_null()
|
D | DoubleUnaryOperatorTest.java | 29 assertEquals(Double.NaN, DoubleUnaryOperator.identity().applyAsDouble(Double.NaN)); in testIdentity() 30 assertEquals(Double.NEGATIVE_INFINITY, in testIdentity() 31 DoubleUnaryOperator.identity().applyAsDouble(Double.NEGATIVE_INFINITY)); in testIdentity() 32 assertEquals(Double.MAX_VALUE, in testIdentity() 33 DoubleUnaryOperator.identity().applyAsDouble(Double.MAX_VALUE)); in testIdentity()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | DoublePipeline.java | 57 extends AbstractPipeline<E_IN, Double, DoubleStream> 67 DoublePipeline(Supplier<? extends Spliterator<Double>> source, in DoublePipeline() 79 DoublePipeline(Spliterator<Double> source, in DoublePipeline() 99 private static DoubleConsumer adapt(Sink<Double> sink) { in adapt() 117 private static Spliterator.OfDouble adapt(Spliterator<Double> s) { in adapt() 139 public final <P_IN> Node<Double> evaluateToNode(PipelineHelper<Double> helper, in evaluateToNode() 142 IntFunction<Double[]> generator) { in evaluateToNode() 148 public final <P_IN> Spliterator<Double> wrap(PipelineHelper<Double> ph, in wrap() 157 …public final Spliterator.OfDouble lazySpliterator(Supplier<? extends Spliterator<Double>> supplier… in lazySpliterator() 163 public final void forEachWithCancel(Spliterator<Double> spliterator, Sink<Double> sink) { in forEachWithCancel() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Double.java | 49 public final class Double extends Number implements Comparable<Double> { class 139 public static final Class<Double> TYPE = (Class<Double>) Class.getPrimitiveClass("double"); 289 return Double.toString(d); in toHexString() 309 long signifBits = (Double.doubleToLongBits(d) in toHexString() 501 public static Double valueOf(String s) throws NumberFormatException { in valueOf() 502 return new Double(parseDouble(s)); in valueOf() 518 public static Double valueOf(double d) { in valueOf() 519 return new Double(d); in valueOf() 592 public Double(double value) { in Double() method in Double 607 public Double(String s) throws NumberFormatException { in Double() method in Double [all …]
|
D | Math.java | 712 long longBits = Double.doubleToRawLongBits(a); in round() 1271 return Double.longBitsToDouble(0x7fffffffffffffffL & Double.doubleToRawLongBits(a)); in abs() 1304 private static long negativeZeroDoubleBits = Double.doubleToRawLongBits(-0.0d); 1351 (Double.doubleToRawLongBits(a) == negativeZeroDoubleBits)) { in max() 1431 (Double.doubleToRawLongBits(b) == negativeZeroDoubleBits)) { in min() 1469 return Double.MIN_VALUE; in ulp() 1483 return Double.longBitsToDouble(1L << in ulp() 1558 return (d == 0.0 || Double.isNaN(d))?d:copySign(1.0, d); in signum() 1793 return Double.longBitsToDouble((Double.doubleToRawLongBits(sign) & in copySign() 1795 (Double.doubleToRawLongBits(magnitude) & in copySign() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/ |
D | DoubleAccumulator.java | 94 base = this.identity = Double.doubleToRawLongBits(identity); in DoubleAccumulator() 105 (r = Double.doubleToRawLongBits in accumulate() 107 (Double.longBitsToDouble(b = base), x))) != b && !casBase(b, r)) { in accumulate() 112 (r = Double.doubleToRawLongBits in accumulate() 114 (Double.longBitsToDouble(v = a.value), x))) == v || in accumulate() 131 double result = Double.longBitsToDouble(base); in get() 136 (result, Double.longBitsToDouble(a.value)); in get() 171 double result = Double.longBitsToDouble(base); in getThenReset() 176 double v = Double.longBitsToDouble(a.value); in getThenReset() 190 return Double.toString(get()); in toString() [all …]
|
D | DoubleAdder.java | 93 Double.doubleToRawLongBits in add() 94 (Double.longBitsToDouble(b) + x))) { in add() 99 Double.doubleToRawLongBits in add() 100 (Double.longBitsToDouble(v) + x)))) in add() 119 double sum = Double.longBitsToDouble(base); in sum() 123 sum += Double.longBitsToDouble(a.value); in sum() 157 double sum = Double.longBitsToDouble(base); in sumThenReset() 164 sum += Double.longBitsToDouble(v); in sumThenReset() 176 return Double.toString(sum()); in toString() 239 a.base = Double.doubleToRawLongBits(value); in readResolve()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | DoubleSummaryStatisticsTest.java | 31 assertEquals(Double.POSITIVE_INFINITY, dss.getMin()); in test_empty() 32 assertEquals(Double.NEGATIVE_INFINITY, dss.getMax()); in test_empty() 65 dss1.accept(Double.NaN); in test_getSum() 66 assertEquals(Double.NaN, dss1.getSum()); in test_getSum() 73 dss1.accept(Double.NaN); in test_getMin() 74 assertEquals(Double.NaN, dss1.getMin()); in test_getMin() 81 dss1.accept(Double.NaN); in test_getMax() 82 assertEquals(Double.NaN, dss1.getMax()); in test_getMax() 89 dss1.accept(Double.NaN); in test_getAverage() 90 assertEquals(Double.NaN, dss1.getAverage()); in test_getAverage()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | DoubleAccumulatorTest.java | 32 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testConstructor() 40 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testAccumulateAndGet() 53 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testReset() 64 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testGetThenReset() 75 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testToString() 78 assertEquals(Double.toString(1.0), ai.toString()); in testToString() 85 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testIntValue() 95 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testLongValue() 105 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testFloatValue() 115 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testDoubleValue() [all …]
|
/libcore/json/src/main/java/org/json/ |
D | JSON.java | 24 if (Double.isInfinite(d) || Double.isNaN(d)) { in checkDouble() 44 static Double toDouble(Object value) { in toDouble() 45 if (value instanceof Double) { in toDouble() 46 return (Double) value; in toDouble() 51 return Double.valueOf((String) value); in toDouble() 65 return (int) Double.parseDouble((String) value); in toInteger() 79 return (long) Double.parseDouble((String) value); in toLong()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | DoubleConsts.java | 41 public static final double POSITIVE_INFINITY = java.lang.Double.POSITIVE_INFINITY; 42 public static final double NEGATIVE_INFINITY = java.lang.Double.NEGATIVE_INFINITY; 43 public static final double NaN = java.lang.Double.NaN; 44 public static final double MAX_VALUE = java.lang.Double.MAX_VALUE; 45 public static final double MIN_VALUE = java.lang.Double.MIN_VALUE;
|
/libcore/ojluni/annotations/hiddenapi/java/lang/ |
D | Double.java | 32 public final class Double extends java.lang.Number class 33 implements java.lang.Comparable<java.lang.Double> { 35 public Double(double value) { in Double() method in Double 39 public Double(java.lang.String s) throws java.lang.NumberFormatException { in Double() method in Double 51 public static java.lang.Double valueOf(java.lang.String s) in valueOf() 56 public static java.lang.Double valueOf(double d) { in valueOf() 132 public int compareTo(java.lang.Double anotherDouble) { in compareTo() 172 public static final java.lang.Class<java.lang.Double> TYPE;
|
/libcore/ojluni/annotations/sdk/nullability/java/lang/ |
D | Double.annotated.java | 31 public final class Double extends java.lang.Number implements java.lang.Comparable<java.lang.Double… class 33 public Double(double value) { throw new RuntimeException("Stub!"); } in Double() method in Double 35 public Double(@libcore.util.NonNull java.lang.String s) throws java.lang.NumberFormatException { th… in Double() method in Double 41 @libcore.util.NonNull public static java.lang.Double valueOf(@libcore.util.NonNull java.lang.String… in valueOf() 43 @libcore.util.NonNull public static java.lang.Double valueOf(double d) { throw new RuntimeException… in valueOf() 83 public int compareTo(@libcore.util.NonNull java.lang.Double anotherDouble) { throw new RuntimeExcep… in compareTo() 113 public static final java.lang.Class<java.lang.Double> TYPE;
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | DoubleBenchmark.java | 26 result = Double.doubleToLongBits(d); in timeDoubleToLongBits() 36 result = Double.doubleToRawLongBits(d); in timeDoubleToRawLongBits() 46 result = Double.longBitsToDouble(l); in timeLongBitsToDouble() 49 … throw new RuntimeException(Double.toString(result) + " " + Double.doubleToRawLongBits(result)); in timeLongBitsToDouble()
|