Home
last modified time | relevance | path

Searched refs:NEGATIVE_INFINITY (Results 1 – 25 of 78) sorted by relevance

1234

/libcore/luni/src/test/java/libcore/libcore/util/
DFP16Test.java36 assertEquals(NEGATIVE_INFINITY, toHalf(Float.NEGATIVE_INFINITY)); in testSingleToHalf()
59 assertEquals(NEGATIVE_INFINITY, toHalf(-65520.0f)); in testSingleToHalf()
75 assertEquals(Float.NEGATIVE_INFINITY, toFloat(toHalf(Float.NEGATIVE_INFINITY)), 0.0f); in testHalfToSingle()
92 assertEquals("-Infinity", toHexString(NEGATIVE_INFINITY)); in testHexString()
109 assertTrue(FP16.isInfinite(NEGATIVE_INFINITY)); in testIsInfinite()
121 assertFalse(FP16.isNaN(NEGATIVE_INFINITY)); in testIsNaN()
137 assertFalse(FP16.isNormalized(NEGATIVE_INFINITY)); in testIsNormalized()
155 assertEquals(NEGATIVE_INFINITY, FP16.ceil(NEGATIVE_INFINITY)); in testCeil()
181 assertTrue(FP16.equals(NEGATIVE_INFINITY, NEGATIVE_INFINITY)); in testEquals()
195 assertEquals(NEGATIVE_INFINITY, FP16.floor(NEGATIVE_INFINITY)); in testFloor()
[all …]
/libcore/ojluni/src/test/java/util/stream/
DTestDoubleSumAverage.java105 testCases.put(() -> DoubleStream.of(-MAX_VALUE, -MAX_VALUE), NEGATIVE_INFINITY); in testNonfiniteSum()
112 testCases.put(() -> DoubleStream.of(1.0d, NEGATIVE_INFINITY, 1.0d), NEGATIVE_INFINITY); in testNonfiniteSum()
113 testCases.put(() -> DoubleStream.of(NEGATIVE_INFINITY), NEGATIVE_INFINITY); in testNonfiniteSum() local
114 … testCases.put(() -> DoubleStream.of(NEGATIVE_INFINITY, NEGATIVE_INFINITY), NEGATIVE_INFINITY); in testNonfiniteSum() local
115 …testCases.put(() -> DoubleStream.of(NEGATIVE_INFINITY, NEGATIVE_INFINITY, 0.0), NEGATIVE_INFINITY); in testNonfiniteSum() local
119 testCases.put(() -> DoubleStream.of(1.0d, NEGATIVE_INFINITY, POSITIVE_INFINITY, 1.0d), NaN); in testNonfiniteSum()
120 testCases.put(() -> DoubleStream.of(1.0d, POSITIVE_INFINITY, NEGATIVE_INFINITY, 1.0d), NaN); in testNonfiniteSum()
122 testCases.put(() -> DoubleStream.of(NEGATIVE_INFINITY, NaN), NaN); in testNonfiniteSum()
124 testCases.put(() -> DoubleStream.of(NaN, NEGATIVE_INFINITY), NaN); in testNonfiniteSum()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DMathTest.java125 assertEquals(Double.NEGATIVE_INFINITY, Math.cbrt(Double.NEGATIVE_INFINITY), 0D); in test_cbrt_D()
160 Double.NEGATIVE_INFINITY };
232 Float.NEGATIVE_INFINITY };
313 Double.POSITIVE_INFINITY, Math.cosh(Double.NEGATIVE_INFINITY), 0D); in test_cosh_D()
354 .expm1(Double.NEGATIVE_INFINITY), 0D); in test_expm1_D()
400 … Double.toString(Double.NEGATIVE_INFINITY), Double.toString(Math.floor(Double.NEGATIVE_INFINITY))); in test_floorD()
407 Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY,
453 Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.MAX_VALUE,
501 Double.POSITIVE_INFINITY, Math.hypot(Double.NEGATIVE_INFINITY, in test_hypot_DD()
508 Double.NEGATIVE_INFINITY), 0D); in test_hypot_DD()
[all …]
DStrictMathTest.java136 Double.NEGATIVE_INFINITY, StrictMath in test_cbrt_D()
137 .cbrt(Double.NEGATIVE_INFINITY)); in test_cbrt_D()
330 .cosh(Double.NEGATIVE_INFINITY)); in test_cosh_D()
373 .expm1(Double.NEGATIVE_INFINITY)); in test_expm1_D()
457 Double.POSITIVE_INFINITY, StrictMath.hypot(Double.NEGATIVE_INFINITY, in test_hypot_DD()
464 Double.NEGATIVE_INFINITY)); in test_hypot_DD()
467 Double.NEGATIVE_INFINITY)); in test_hypot_DD()
469 Double.POSITIVE_INFINITY, StrictMath.hypot(Double.NEGATIVE_INFINITY, in test_hypot_DD()
529 Double.NEGATIVE_INFINITY, StrictMath.log10(0.0)); in test_log10_D()
531 Double.NEGATIVE_INFINITY, StrictMath.log10(+0.0)); in test_log10_D()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidStrictMathTest.java101 Double.NEGATIVE_INFINITY, StrictMath in testCbrtD()
102 .cbrt(Double.NEGATIVE_INFINITY)); in testCbrtD()
157 .cosh(Double.NEGATIVE_INFINITY)); in testCosh_D()
194 .expm1(Double.NEGATIVE_INFINITY)); in testExpm1D()
231 Double.POSITIVE_INFINITY, StrictMath.hypot(Double.NEGATIVE_INFINITY, in testHypotDD()
238 Double.NEGATIVE_INFINITY)); in testHypotDD()
241 Double.NEGATIVE_INFINITY)); in testHypotDD()
243 Double.POSITIVE_INFINITY, StrictMath.hypot(Double.NEGATIVE_INFINITY, in testHypotDD()
294 Double.NEGATIVE_INFINITY, StrictMath.log10(0.0)); in testLog10D()
296 Double.NEGATIVE_INFINITY, StrictMath.log10(+0.0)); in testLog10D()
[all …]
DOldAndroidMathTest.java110 assertEquals("wrong atan(-INF)", -PI / 2, Math.atan(Double.NEGATIVE_INFINITY), 0); in testAtanD()
161 Double.NEGATIVE_INFINITY, Math in testCbrtD()
162 .cbrt(Double.NEGATIVE_INFINITY), 0D); in testCbrtD()
205 Double.POSITIVE_INFINITY, Math.cosh(Double.NEGATIVE_INFINITY), 0D); in testCoshD()
240 .expm1(Double.NEGATIVE_INFINITY), 0D); in testExpm1D()
275 Double.POSITIVE_INFINITY, Math.hypot(Double.NEGATIVE_INFINITY, in testHypotDD()
282 Double.NEGATIVE_INFINITY), 0D); in testHypotDD()
285 Double.NEGATIVE_INFINITY), 0D); in testHypotDD()
287 Double.POSITIVE_INFINITY, Math.hypot(Double.NEGATIVE_INFINITY, in testHypotDD()
330 assertEquals(Double.NEGATIVE_INFINITY, Math.log10(0.0)); in testLog10D()
[all …]
DOldDoubleTest.java35 assertEquals(0xfff0000000000000L, Double.doubleToLongBits(Double.NEGATIVE_INFINITY)); in test_doubleToLongBitsD()
41 assertEquals(0xfff0000000000000L, Double.doubleToLongBits(Double.NEGATIVE_INFINITY)); in test_doubleToRawLongBitsD()
46 assertEquals(Double.NEGATIVE_INFINITY, new Double("-1.7976931348623159E308").doubleValue()); in test_doubleValue()
53 assertEquals(Float.NEGATIVE_INFINITY, new Double("-3.4028236E38").floatValue()); in test_floatValue()
DOldFloatTest.java53 assertEquals(0xff800000, Float.floatToIntBits(Float.NEGATIVE_INFINITY)); in test_floatToIntBitsF()
59 assertEquals(0xff800000, Float.floatToRawIntBits(Float.NEGATIVE_INFINITY)); in test_floatToRawIntBitsF()
69 assertEquals(Float.NEGATIVE_INFINITY, Float.intBitsToFloat(0xff800000)); in test_intBitsToFloatI()
DFloatTest.java52 assertEquals(Float.NEGATIVE_INFINITY, Float.parseFloat("-Infinity")); in testNamedFloats()
106 assertEquals(Float.NEGATIVE_INFINITY, Float.parseFloat("-1.0e+39")); in testExponentParsing()
109 assertEquals(Float.NEGATIVE_INFINITY, Float.parseFloat("-1.0e+9999999999")); in testExponentParsing()
DDoubleTest.java50 assertEquals(Double.NEGATIVE_INFINITY, Double.parseDouble("-Infinity")); in testNamedDoubles()
106 assertEquals(Double.NEGATIVE_INFINITY, Double.parseDouble("-1.0e+309")); in testExponentParsing()
109 assertEquals(Double.NEGATIVE_INFINITY, Double.parseDouble("-1.0e+9999999999")); in testExponentParsing()
/libcore/ojluni/src/test/java/lang/Math/
DRoundTests.java83 Tests.test("Math.round", Float.NEGATIVE_INFINITY, in testSpecialCases()
84 Math.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE); in testSpecialCases()
98 Tests.test("Math.round", Double.NEGATIVE_INFINITY, in testSpecialCases()
99 Math.round(Double.NEGATIVE_INFINITY), Long.MIN_VALUE); in testSpecialCases()
DClamp.java145 {-Double.MAX_VALUE, Double.NEGATIVE_INFINITY, 0.0, -Double.MAX_VALUE}, in testDoubleClamp()
146 {Double.NEGATIVE_INFINITY, -Double.MAX_VALUE, 0.0, -Double.MAX_VALUE}, in testDoubleClamp()
162 {Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.NaN} in testDoubleClamp()
209 {-Float.MAX_VALUE, Float.NEGATIVE_INFINITY, 0.0f, -Float.MAX_VALUE}, in testFloatClamp()
210 {Float.NEGATIVE_INFINITY, -Float.MAX_VALUE, 0.0f, -Float.MAX_VALUE}, in testFloatClamp()
226 {Float.NaN, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, Float.NaN} in testFloatClamp()
DAbsPositiveZero.java49 Assert.assertEquals(Math.abs(Double.NEGATIVE_INFINITY), Double.POSITIVE_INFINITY); in testAbsPositiveZero()
58 Assert.assertEquals(Math.abs(Float.NEGATIVE_INFINITY), Float.POSITIVE_INFINITY); in testAbsPositiveZero()
DPowTests.java98 Double.NEGATIVE_INFINITY, in testCrossProduct()
205 } else if (x == Double.NEGATIVE_INFINITY) { in testCrossProduct()
237 Double.NEGATIVE_INFINITY : in f1()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DFormatterTest.java2803 { Float.NEGATIVE_INFINITY, "%e", "-Infinity" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2804 { Float.NEGATIVE_INFINITY, "%#.0e", "-Infinity" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2805 { Float.NEGATIVE_INFINITY, "%#- (9.8e", "(Infinity)" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2806 { Float.NEGATIVE_INFINITY, "%#+0(8.4e", "(Infinity)" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2807 { Float.NEGATIVE_INFINITY, "%-+(1.6e", "(Infinity)" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2808 { Float.NEGATIVE_INFINITY, "% 0(12e", " (Infinity)" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2810 { Float.NEGATIVE_INFINITY, "%e", "-Infinity" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2811 { Float.NEGATIVE_INFINITY, "%#.0e", "-Infinity" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2812 { Float.NEGATIVE_INFINITY, "%#- (9.8e", "(Infinity)" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
2813 { Float.NEGATIVE_INFINITY, "%#+0(8.4e", "(Infinity)" }, in test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE()
[all …]
DArrays2Test.java38 double[] specials = new double[] { Double.NEGATIVE_INFINITY, in test_binarySearch$DD()
58 float[] specials = new float[] { Float.NEGATIVE_INFINITY, in test_binarySearch$FF()
133 … Double.MAX_VALUE, Double.MIN_VALUE, 0d, -0d, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY }; in test_sort$D()
134 …pecials2 = new double[] { 0d, Double.POSITIVE_INFINITY, -0d, Double.NEGATIVE_INFINITY, Double.MIN_… in test_sort$D()
135 …double[] answer = new double[] { Double.NEGATIVE_INFINITY, -0d, 0d, Double.MIN_VALUE, Double.MAX_V… in test_sort$D()
169 …NaN, Float.MAX_VALUE, Float.MIN_VALUE, 0f, -0f, Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY }; in test_sort$F()
170 …float[] specials2 = new float[] { 0f, Float.POSITIVE_INFINITY, -0f, Float.NEGATIVE_INFINITY, Float… in test_sort$F()
171 …float[] answer = new float[] { Float.NEGATIVE_INFINITY, -0f, 0f, Float.MIN_VALUE, Float.MAX_VALUE,… in test_sort$F()
/libcore/ojluni/src/test/java/util/Arrays/
DFloatDoubleOrder.java44 Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, 0.0d, -0.0d}; in test()
46 double[] sortedDbl = new double[] {Double.NEGATIVE_INFINITY, -2.0d, in test()
71 Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, 0.0f, -0.0f}; in test()
73 float[] sortedFlt = new float[] {Float.NEGATIVE_INFINITY, -2.0f, in test()
/libcore/ojluni/src/main/java/jdk/internal/math/
DFloatConsts.java46 public static final float NEGATIVE_INFINITY = java.lang.Float.NEGATIVE_INFINITY; field in FloatConsts
DDoubleConsts.java46 public static final double NEGATIVE_INFINITY = java.lang.Double.NEGATIVE_INFINITY; field in DoubleConsts
/libcore/luni/src/test/java/libcore/java/util/function/
DDoubleUnaryOperatorTest.java30 assertEquals(Double.NEGATIVE_INFINITY, in testIdentity()
31 DoubleUnaryOperator.identity().applyAsDouble(Double.NEGATIVE_INFINITY)); in testIdentity()
/libcore/ojluni/src/test/java/text/Format/NumberFormat/
DBigDecimalParse.java210 check("-1000", Double.NEGATIVE_INFINITY); in test_Parse_in_DecimalFormat_BigDecimal_DivisionByZero()
231 check("-1000.000", Double.NEGATIVE_INFINITY); in test_Parse_in_DecimalFormat_Double_DivisionByZero()
251 check("-\u221e", Double.NEGATIVE_INFINITY); in test_Parse_in_DecimalFormat_Double_DivisionByZero()
268 check("-1000", Double.NEGATIVE_INFINITY); in test_Parse_in_DecimalFormat_Long_DivisionByZero()
361 Double.NEGATIVE_INFINITY, Double.NaN, in test_Parse_in_DecimalFormat_SpecialNumber()
367 Double.NEGATIVE_INFINITY, Double.NaN, in test_Parse_in_DecimalFormat_SpecialNumber()
/libcore/ojluni/src/test/java/util/Random/
DRandomTest.java208 assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
214 assertThrowsIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
219 assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConvertTest.java241 assertTrue(aNumber == Double.NEGATIVE_INFINITY); in testDoubleValueNegativeInfinity1()
262 assertTrue(aNumber == Double.NEGATIVE_INFINITY); in testDoubleValueNegativeInfinity2()
492 assertTrue(aNumber == Float.NEGATIVE_INFINITY); in testFloatValueNegativeInfinity1()
505 assertTrue(aNumber == Float.NEGATIVE_INFINITY); in testFloatValueNegativeInfinity2()
530 assertTrue(aNumber == Float.NEGATIVE_INFINITY); in testFloatValueNegMantissaIsZero()
/libcore/luni/src/test/java/libcore/java/util/
DDoubleSummaryStatisticsTest.java36 assertEquals(Double.NEGATIVE_INFINITY, dss.getMax()); in test_empty()
131 assertEquals(Double.NEGATIVE_INFINITY, dss.getMax()); in test_constructorLongDoubleDoubleDouble_ignoresMinMaxSum_whenCountIsZero()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DDoublePrimitiveOpsTests.java98 Double.NEGATIVE_INFINITY, 2, 9, 1, 0, 8, Double.NaN, -0.0}; in testSortDistinct()
99 double[] expected = {Double.NEGATIVE_INFINITY, -0.0, 0, 1, 2, 3, 5, 8, 9, in testSortDistinct()

1234