Searched refs:NaN (Results 1 - 25 of 46) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/lang/
H A DOldFloatTest.java54 assertEquals(0x7fc00000, Float.floatToIntBits(Float.NaN));
60 assertEquals(0x7fc00000, Float.floatToRawIntBits(Float.NaN));
71 assertEquals(Float.NaN, Float.intBitsToFloat(0x7f800001));
72 assertEquals(Float.NaN, Float.intBitsToFloat(0x7fffffff));
73 assertEquals(Float.NaN, Float.intBitsToFloat(0xff800001));
74 assertEquals(Float.NaN, Float.intBitsToFloat(0xffffffff));
H A DOldDoubleTest.java33 assertEquals(0x7ff8000000000000L, Double.doubleToLongBits(Double.NaN));
39 assertEquals(0x7ff8000000000000L, Double.doubleToLongBits(Double.NaN));
H A DDoubleTest.java34 assertEquals(Double.NaN, Double.parseDouble("NaN"));
35 assertEquals(Double.NaN, Double.parseDouble("-NaN"));
36 assertEquals(Double.NaN, Double.parseDouble("+NaN"));
H A DFloatTest.java36 assertEquals(Float.NaN, Float.parseFloat("NaN"));
37 assertEquals(Float.NaN, Float.parseFloat("-NaN"));
38 assertEquals(Float.NaN, Float.parseFloat("+NaN"));
H A DOldAndroidMathTest.java115 assertTrue("Should return Double.NaN", Double.isNaN(Math
116 .cbrt(Double.NaN)));
161 assertTrue(Double.isNaN(Math.cosh(Double.NaN)));
196 assertTrue("Should return NaN", Double.isNaN(Math.expm1(Double.NaN)));
249 assertTrue("Should be NaN", Double.isNaN(Math.hypot(Double.NaN,
251 assertTrue("Should be NaN", Double.isNaN(Math.hypot(-345.2680,
252 Double.NaN)));
286 assertTrue(Double.isNaN(Math.log10(Double.NaN)));
[all...]
H A DOldAndroidStrictMathTest.java95 assertTrue("Should return Double.NaN", Double.isNaN(StrictMath
96 .cbrt(Double.NaN)));
150 assertTrue("Should return NaN", Double.isNaN(StrictMath
151 .cosh(Double.NaN)));
190 assertTrue("Should return NaN", Double.isNaN(StrictMath.expm1(Double.NaN)));
245 assertTrue("Should return NaN", Double.isNaN(StrictMath.hypot(Double.NaN,
247 assertTrue("Should return NaN", Double.isNaN(StrictMath.hypot(-345.2680,
248 Double.NaN)));
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DDoubleSummaryStatisticsTest.java65 dss1.accept(Double.NaN);
66 assertEquals(Double.NaN, dss1.getSum());
73 dss1.accept(Double.NaN);
74 assertEquals(Double.NaN, dss1.getMin());
81 dss1.accept(Double.NaN);
82 assertEquals(Double.NaN, dss1.getMax());
89 dss1.accept(Double.NaN);
90 assertEquals(Double.NaN, dss1.getAverage());
/libcore/ojluni/src/main/java/sun/misc/
H A DFloatConsts.java43 public static final float NaN = java.lang.Float.NaN; field in class:FloatConsts
H A DDoubleConsts.java43 public static final double NaN = java.lang.Double.NaN; field in class:DoubleConsts
/libcore/ojluni/src/test/java/util/stream/
H A DTestDoubleSumAverage.java115 testCases.put(() -> DoubleStream.of(1.0d, NaN, 1.0d), NaN);
116 testCases.put(() -> DoubleStream.of(NaN), NaN);
117 testCases.put(() -> DoubleStream.of(1.0d, NEGATIVE_INFINITY, POSITIVE_INFINITY, 1.0d), NaN);
118 testCases.put(() -> DoubleStream.of(1.0d, POSITIVE_INFINITY, NEGATIVE_INFINITY, 1.0d), NaN);
119 testCases.put(() -> DoubleStream.of(POSITIVE_INFINITY, NaN), NaN);
120 testCases.put(() -> DoubleStream.of(NEGATIVE_INFINITY, NaN), NaN);
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DMathTest.java123 assertTrue(Double.isNaN(Math.cbrt(Double.NaN)));
175 // cases for NaN
176 assertEquals("If the sign is NaN, the result should be positive.",
178 magnitude, Double.NaN)));
179 assertTrue("The result should be NaN.", Double.isNaN(Math.copySign(
180 Double.NaN, magnitude)));
201 assertTrue("The result should be NaN.", Double.isNaN(Math.copySign(
202 Double.NaN, Double.NaN)));
247 // cases for NaN
[all...]
H A DStrictMathTest.java130 assertTrue("Should return Double.NaN", Double.isNaN(StrictMath
131 .cbrt(Double.NaN)));
191 // cases for NaN
192 assertEquals("If the sign is NaN, the result should be positive.",
194 .copySign(magnitude, Double.NaN)));
195 assertTrue("The result should be NaN.", Double.isNaN(StrictMath
196 .copySign(Double.NaN, magnitude)));
217 assertTrue("The result should be NaN.", Double.isNaN(StrictMath
218 .copySign(Double.NaN, Double.NaN)));
[all...]
H A DFloatTest.java134 Float.POSITIVE_INFINITY, Float.NaN };
259 assertFalse(Float.isInfinite(Float.NaN));
272 assertFalse(Float.isFinite(Float.NaN));
281 assertTrue("NAN check failed", new Float(Float.NaN).isNaN()
290 assertTrue("NaN check failed", Float.isNaN(Float.NaN) && !(Float.isNaN(12.09f)));
908 Float expectedNaN = new Float(Float.NaN);
910 Float posNaN = Float.valueOf("NaN");
913 Float posNaNSigned = Float.valueOf("+NaN");
916 Float negNaNSigned = Float.valueOf("-NaN");
[all...]
/libcore/luni/src/test/java/libcore/java/util/function/
H A DDoubleUnaryOperatorTest.java29 assertEquals(Double.NaN, DoubleUnaryOperator.identity().applyAsDouble(Double.NaN));
/libcore/ojluni/src/main/java/java/text/
H A DDecimalFormatSymbols.java300 return NaN;
307 public void setNaN(String NaN) { argument
308 this.NaN = NaN;
541 NaN.equals(other.NaN) &&
563 result = result * 37 + NaN.hashCode();
597 values[10] = localeData.NaN;
615 NaN = numberElements[10];
698 cachedIcuDFS.setNaN(NaN);
941 private String NaN; field in class:DecimalFormatSymbols
[all...]
H A DChoiceFormat.java134 * System.out.println("Format with NaN : " + fmt.format(Double.NaN));
149 * Format with NaN : is negative
186 double oldStartValue = Double.NaN;
387 // same as number < choiceLimits, except catchs NaN
413 double bestNumber = Double.NaN;
436 * If NaN, returns same value.
446 * If NaN, returns same value.
556 * If NaN, returns same value.
566 /* filter out NaN'
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DArrays2Test.java41 Double.POSITIVE_INFINITY, Double.NaN };
61 Float.NaN };
91 assertTrue("Assert 3: NaN not equals",
92 Arrays.equals(new double[] { Double.NaN }, new double[] { Double.NaN }));
111 assertTrue("Assert 2: NaN not equals",
112 Arrays.equals(new float[] { Float.NaN }, new float[] { Float.NaN }));
133 double[] specials1 = new double[] { Double.NaN, Double.MAX_VALUE, Double.MIN_VALUE, 0d, -0d, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY };
134 double[] specials2 = new double[] { 0d, Double.POSITIVE_INFINITY, -0d, Double.NEGATIVE_INFINITY, Double.MIN_VALUE, Double.NaN, Doubl
[all...]
H A DFormatterTest.java2798 { Float.NaN, "%e", "NaN" },
2799 { Float.NaN, "%#.0e", "NaN" },
2800 { Float.NaN, "%#- (9.8e", "NaN " },
2801 { Float.NaN, "%#+0(8.4e", " NaN" },
2802 { Float.NaN, "%-+(1.6e", "NaN" },
[all...]
/libcore/ojluni/src/main/java/java/util/
H A DOptionalDouble.java64 this.value = Double.NaN;
/libcore/json/src/test/java/org/json/
H A DJSONObjectTest.java95 assertEquals(Double.NaN, object.optDouble("foo"));
186 object.putOpt("foo", Double.NaN);
316 object.put("foo", (Float) Float.NaN);
344 return Double.NaN;
354 fail("Object.put() accepted a NaN (via a custom Number class)");
445 assertEquals(Double.NaN, object.optDouble("quux"));
507 object.accumulate("foo", Double.NaN);
513 object.accumulate("foo", Double.NaN);
519 object.accumulate("foo", Double.NaN);
612 object.put("foo", Double.NaN);
[all...]
H A DJSONArrayTest.java294 assertEquals(Double.NaN, array.optDouble(3));
394 array.put(Double.NaN);
412 array.put(Double.valueOf(Double.NaN));
423 JSONArray array = new JSONArray(Arrays.asList(5.5, Double.NaN));
426 assertEquals(Double.NaN, array.getDouble(1));
431 JSONArray array = new JSONArray(Arrays.asList(5.5, Double.NaN));
/libcore/benchmarks/src/benchmarks/regression/
H A DRealToStringBenchmark.java27 Float.toString(Float.NaN);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DChoiceFormatTest.java270 assertEquals(0, new ChoiceFormat("|").format(Double.NaN, new StringBuffer(), new FieldPosition(6)).length());
272 assertEquals("Less than one", f1.format(Double.NaN, new StringBuffer(), field).toString());
338 assertTrue("Not NaN", Double.isNaN(ChoiceFormat.nextDouble(Double.NaN)));
388 assertTrue("Not NaN", Double.isNaN(ChoiceFormat
389 .previousDouble(Double.NaN)));
/libcore/luni/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/
H A DAnnotationTest.java265 @TestAnnotation3(f = Float.NaN)
267 @TestAnnotation3(f = Float.NaN)
294 @TestAnnotation3(d = Double.NaN)
296 @TestAnnotation3(d = Double.NaN)
/libcore/dex/src/test/java/com/android/dex/
H A DEncodedValueReaderTest.java67 assertEquals(Float.NaN, readerOf(48, -64, 127).readFloat());
79 assertEquals(Double.NaN, readerOf(49, -8, 127).readDouble());

Completed in 668 milliseconds

12