Home
last modified time | relevance | path

Searched refs:MAX_VALUE (Results 1 – 25 of 211) sorted by relevance

123456789

/libcore/luni/src/main/java/java/math/
DMultiplication.java133 if (exp <= Integer.MAX_VALUE) { in powerOf10()
144 BigInteger powerOfFive = bigFivePows[1].pow(Integer.MAX_VALUE); in powerOf10()
146 long longExp = exp - Integer.MAX_VALUE; in powerOf10()
148 intExp = (int) (exp % Integer.MAX_VALUE); in powerOf10()
149 while (longExp > Integer.MAX_VALUE) { in powerOf10()
151 longExp -= Integer.MAX_VALUE; in powerOf10()
155 res = res.shiftLeft(Integer.MAX_VALUE); in powerOf10()
156 longExp = exp - Integer.MAX_VALUE; in powerOf10()
157 while (longExp > Integer.MAX_VALUE) { in powerOf10()
158 res = res.shiftLeft(Integer.MAX_VALUE); in powerOf10()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DOldParsePositionTest.java23 ParsePosition pp = new ParsePosition(Integer.MAX_VALUE);
31 pp1.setIndex(Integer.MAX_VALUE); in test_hashCode()
40 pp.setErrorIndex(Integer.MAX_VALUE); in test_getErrorIndex()
41 assertEquals("getErrorIndex failed.", Integer.MAX_VALUE, in test_getErrorIndex()
43 assertEquals("getErrorIndex failed.", Integer.MAX_VALUE, in test_getErrorIndex()
DOldNumberFormatTest.java238 String out = nf1.format(Long.MAX_VALUE); in test_formatLlong()
445 nf1.setMaximumFractionDigits(Integer.MAX_VALUE); in test_getMaximumFractionDigits()
448 + " instead of: " + Integer.MAX_VALUE, in test_getMaximumFractionDigits()
449 result == Integer.MAX_VALUE); in test_getMaximumFractionDigits()
456 nf1.setMinimumFractionDigits(Integer.MAX_VALUE); in test_getMaximumFractionDigits()
459 + " instead of Integer.MAX_VALUE", result == Integer.MAX_VALUE); in test_getMaximumFractionDigits()
464 nf1.setMinimumFractionDigits(Integer.MAX_VALUE); in test_getMinimumFractionDigits()
467 + " instead of: " + Integer.MAX_VALUE, in test_getMinimumFractionDigits()
468 result == Integer.MAX_VALUE); in test_getMinimumFractionDigits()
483 nf1.setMaximumIntegerDigits(Integer.MAX_VALUE); in test_getMaximumIntegerDigits()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DOldDoubleTest.java24 Double d = new Double(Byte.MAX_VALUE); in test_byteValue()
25 assertEquals("Returned incorrect byte value", Byte.MAX_VALUE, d.byteValue()); in test_byteValue()
28 d= new Double(Double.MAX_VALUE); in test_byteValue()
47 assertEquals(Double.MAX_VALUE, new Double("1.7976931348623157E308").doubleValue()); in test_doubleValue()
54 assertEquals(Float.MAX_VALUE, new Double("3.4028235E38").floatValue()); in test_floatValue()
59 assertEquals("Returned incorrect int value", Integer.MAX_VALUE, in test_intValue()
66 assertFalse("Doesn't return false value", Double.isNaN(new Double(Double.MAX_VALUE))); in test_isNaND()
DOldFloatTest.java33 Float f = new Float(Double.MAX_VALUE); in test_ConstructorD()
64 assertTrue(new Float(Float.MAX_VALUE).hashCode() != new Float(Float.MIN_VALUE).hashCode()); in test_hashCode()
78 assertEquals(Integer.MAX_VALUE, new Float(Float.MAX_VALUE).intValue()); in test_intValue()
84 assertFalse(Float.isNaN(Float.MAX_VALUE)); in test_isNaNF()
89 assertEquals(Long.MAX_VALUE, new Float(Float.MAX_VALUE).longValue()); in test_longValue()
DOldStringBufferTest.java95 testBuffer.insert(-1, Double.MAX_VALUE); in test_insertID()
102 testBuffer.insert(testBuffer.length() + 1, Double.MAX_VALUE); in test_insertID()
111 testBuffer.insert(-1, Float.MAX_VALUE); in test_insertIF()
118 testBuffer.insert(testBuffer.length() + 1, Float.MAX_VALUE); in test_insertIF()
127 testBuffer.insert(-1, Integer.MAX_VALUE); in test_insertII()
134 testBuffer.insert(testBuffer.length() + 1, Integer.MAX_VALUE); in test_insertII()
143 testBuffer.insert(-1, Long.MAX_VALUE); in test_insertIJ()
150 testBuffer.insert(testBuffer.length() + 1, Long.MAX_VALUE); in test_insertIJ()
301 testBuffer.subSequence(0, Integer.MAX_VALUE); in test_subSequence()
308 testBuffer.subSequence(Integer.MAX_VALUE, testBuffer.length()); in test_subSequence()
DLongTest.java40 final long max = Long.MAX_VALUE; in testCompare()
56 assertEquals(1, Long.signum(Long.MAX_VALUE));
86 assertEquals(Long.MAX_VALUE, Long.parseLong("+" + Long.MAX_VALUE, 10));
112 assertEquals(Long.MAX_VALUE, Long.decode("+" + Long.MAX_VALUE).longValue());
DOldStringTest.java53 testString.charAt(Integer.MAX_VALUE); in test_charAtI()
251 Arrays.equals(results[1], str.split(pattern, Integer.MAX_VALUE))); in test_splitLStringLint()
300 hw1.substring(Integer.MAX_VALUE); in test_substringI()
316 hw1.substring(Integer.MAX_VALUE, hw1.length()); in test_substringII()
323 hw1.substring(0, Integer.MAX_VALUE); in test_substringII()
337 hw1.subSequence(0, Integer.MAX_VALUE); in test_subSequence()
344 hw1.subSequence(Integer.MAX_VALUE, hw1.length()); in test_subSequence()
394 String.valueOf(t, 0, Integer.MAX_VALUE); in test_valueOf$CII()
DOldAndroidMathTest.java134 5.643803094122362E102, Math.cbrt(Double.MAX_VALUE), 0D); in testCbrtD()
181 Double.POSITIVE_INFINITY, Math.cosh(Double.MAX_VALUE), 0D); in testCoshD()
216 Double.POSITIVE_INFINITY, Math.expm1(Double.MAX_VALUE), 0D); in testExpm1D()
259 1.7976931348623157E308, Math.hypot(Double.MAX_VALUE, 211370.35), 0D); in testHypotDD()
299 assertEquals(308.25471555991675, Math.log10(Double.MAX_VALUE)); in testLog10D()
323 .log1p(Double.MAX_VALUE), 0D); in testLog1pD()
455 assertEquals(1.0, Math.signum(Double.MAX_VALUE), 0D); in testSignumD()
457 assertEquals(-1.0, Math.signum(-Double.MAX_VALUE), 0D); in testSignumD()
477 assertEquals(1.0f, Math.signum(Float.MAX_VALUE), 0f); in testSignumF()
479 assertEquals(-1.0f, Math.signum(-Float.MAX_VALUE), 0f); in testSignumF()
[all …]
DOldAndroidStrictMathTest.java114 5.643803094122362E102, StrictMath.cbrt(Double.MAX_VALUE)); in testCbrtD()
173 Double.POSITIVE_INFINITY, StrictMath.cosh(Double.MAX_VALUE)); in testCosh_D()
210 Double.POSITIVE_INFINITY, StrictMath.expm1(Double.MAX_VALUE)); in testExpm1D()
255 1.7976931348623157E308, StrictMath.hypot(Double.MAX_VALUE, 211370.35)); in testHypotDD()
309 StrictMath.log10(Double.MAX_VALUE)); in testLog10D()
338 StrictMath.log1p(Double.MAX_VALUE)); in testLog1pD()
471 assertEquals(1.0, StrictMath.signum(Double.MAX_VALUE), 0D); in testSignumD()
473 assertEquals(-1.0, StrictMath.signum(-Double.MAX_VALUE), 0D); in testSignumD()
494 assertEquals(1.0f, StrictMath.signum(Float.MAX_VALUE), 0f); in testSignumF()
496 assertEquals(-1.0f, StrictMath.signum(-Float.MAX_VALUE), 0f); in testSignumF()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DFormatterTest.java1408 f.format("%c", Integer.MAX_VALUE); in test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion()
1732 { Long.MAX_VALUE, 'a', "So." }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1738 { Long.MAX_VALUE, 'b', "Aug" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1744 { Long.MAX_VALUE, 'c', "So. Aug 17 15:18:47 GMT+08:00 292278994" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1750 { Long.MAX_VALUE, 'd', "17" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1756 { Long.MAX_VALUE, 'e', "17" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1762 { Long.MAX_VALUE, 'h', "Aug" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1768 { Long.MAX_VALUE, 'j', "229" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1774 { Long.MAX_VALUE, 'k', "15" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1780 { Long.MAX_VALUE, 'l', "3" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
[all …]
DArrays2Test.java37 -Double.MAX_VALUE, -2d, -Double.MIN_VALUE, -0d, 0d, in test_binarySearch$DD()
38 Double.MIN_VALUE, 2d, Double.MAX_VALUE, in test_binarySearch$DD()
57 -Float.MAX_VALUE, -2f, -Float.MIN_VALUE, -0f, 0f, in test_binarySearch$FF()
58 Float.MIN_VALUE, 2f, Float.MAX_VALUE, Float.POSITIVE_INFINITY, in test_binarySearch$FF()
78 Arrays.fill(d, Double.MAX_VALUE); in test_equals$D$D()
83 Arrays.fill(x, Double.MAX_VALUE); in test_equals$D$D()
101 Arrays.fill(d, Float.MAX_VALUE); in test_equals$F$F()
106 Arrays.fill(x, Float.MAX_VALUE); in test_equals$F$F()
131 …double[] specials1 = new double[] { Double.NaN, Double.MAX_VALUE, Double.MIN_VALUE, 0d, -0d, Doubl… in test_sort$D()
132 …POSITIVE_INFINITY, -0d, Double.NEGATIVE_INFINITY, Double.MIN_VALUE, Double.NaN, Double.MAX_VALUE }; in test_sort$D()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineResultTest.java95 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_bytesConsumed()
118 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_bytesProduced()
141 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_getHandshakeStatus()
164 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_getStatus()
187 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_toString()
/libcore/luni/src/test/java/dalvik/system/
DJniTest.java150 final char[] literals = {Character.MAX_VALUE, Character.MIN_VALUE, in testPassingChars()
181 final byte[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, 0, -1}; in testPassingBytes()
209 …final short[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, 0, -1}; in testPassingShorts()
237 final int[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingInts()
238 Integer.MAX_VALUE, Integer.MIN_VALUE, 0, -1}; in testPassingInts()
266 final long[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingLongs()
267 … Integer.MAX_VALUE, Integer.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE, 0, -1}; in testPassingLongs()
295 final float[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingFloats()
296 … Integer.MAX_VALUE, Integer.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE, in testPassingFloats()
297 Float.MAX_VALUE, Float.MIN_VALUE, Float.MIN_NORMAL, Float.NaN, in testPassingFloats()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java271 assertEquals(Long.MAX_VALUE, in testConvertSaturate()
272 NANOSECONDS.convert(Long.MAX_VALUE / 2, SECONDS)); in testConvertSaturate()
274 NANOSECONDS.convert(-Long.MAX_VALUE / 4, SECONDS)); in testConvertSaturate()
275 assertEquals(Long.MAX_VALUE, in testConvertSaturate()
276 NANOSECONDS.convert(Long.MAX_VALUE / 2, MINUTES)); in testConvertSaturate()
278 NANOSECONDS.convert(-Long.MAX_VALUE / 4, MINUTES)); in testConvertSaturate()
279 assertEquals(Long.MAX_VALUE, in testConvertSaturate()
280 NANOSECONDS.convert(Long.MAX_VALUE / 2, HOURS)); in testConvertSaturate()
282 NANOSECONDS.convert(-Long.MAX_VALUE / 4, HOURS)); in testConvertSaturate()
283 assertEquals(Long.MAX_VALUE, in testConvertSaturate()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DWrappedByteBufferTest.java66 ByteBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
72 ByteBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedByteBuffer_IllegalArg()
78 ByteBuffer.wrap((byte[])null, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
/libcore/luni/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/
DAnnotationTest.java222 @TestAnnotation3(i = Integer.MAX_VALUE)
224 @TestAnnotation3(i = Integer.MAX_VALUE)
227 @TestAnnotation3(i = Integer.MAX_VALUE)
241 @TestAnnotation3(j = Long.MAX_VALUE)
243 @TestAnnotation3(j = Long.MAX_VALUE)
246 @TestAnnotation3(j = Long.MAX_VALUE)
260 @TestAnnotation3(f = Float.MAX_VALUE)
262 @TestAnnotation3(f = Float.MAX_VALUE)
270 @TestAnnotation3(f = Long.MAX_VALUE)
289 @TestAnnotation3(d = Double.MAX_VALUE)
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DFieldTest.java92 protected int intField = Integer.MAX_VALUE;
93 protected final int intFField = Integer.MAX_VALUE;
94 protected static int intSField = Integer.MAX_VALUE;
95 private final int intPFField = Integer.MAX_VALUE;
97 protected short shortField = Short.MAX_VALUE;
98 protected final short shortFField = Short.MAX_VALUE;
99 protected static short shortSField = Short.MAX_VALUE;
100 private final short shortPFField = Short.MAX_VALUE;
107 protected byte byteField = Byte.MAX_VALUE;
108 protected static byte byteSField = Byte.MAX_VALUE;
[all …]
/libcore/luni/src/test/java/libcore/java/util/prefs/
DOldPreferenceChangeEventTest.java64 pref.putInt("key_int", Integer.MAX_VALUE); in testGetKey()
81 if (pce != null && pce.getNewValue().equals(Integer.toString(Integer.MAX_VALUE))) { in testGetNewValue()
89 pref.putInt("key_int", Integer.MAX_VALUE); in testGetNewValue()
94 pref.putInt("key_int", Integer.MAX_VALUE); in testGetNewValue()
119 pref.putInt("key_int", Integer.MAX_VALUE); in testGetNode()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DMathTest.java132 assertEquals(5.643803094122362E102, Math.cbrt(Double.MAX_VALUE), 0D); in test_cbrt_D()
156 Double.POSITIVE_INFINITY, Double.MAX_VALUE, 3.4E302, 2.3,
159 -Double.MIN_NORMAL, -4.5, -3.4E102, -Double.MAX_VALUE,
228 Float.POSITIVE_INFINITY, Float.MAX_VALUE, 3.4E12f, 2.3f,
231 -Float.MIN_NORMAL, -4.5f, -5.6442E21f, -Float.MAX_VALUE,
329 Double.POSITIVE_INFINITY, Math.cosh(Double.MAX_VALUE), 0D); in test_cosh_D()
370 Double.POSITIVE_INFINITY, Math.expm1(Double.MAX_VALUE), 0D); in test_expm1_D()
408 Double.MAX_VALUE, -Double.MAX_VALUE, 2.342E231, -2.342E231, 2800.0,
453 Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.MAX_VALUE,
454 -Float.MAX_VALUE, 3.4256E23f, -3.4256E23f, 2800.0f, -2800.0f,
[all …]
DStrictMathTest.java149 5.643803094122362E102, StrictMath.cbrt(Double.MAX_VALUE)); in test_cbrt_D()
346 Double.POSITIVE_INFINITY, StrictMath.cosh(Double.MAX_VALUE)); in test_cosh_D()
389 Double.POSITIVE_INFINITY, StrictMath.expm1(Double.MAX_VALUE)); in test_expm1_D()
481 1.7976931348623157E308, StrictMath.hypot(Double.MAX_VALUE, 211370.35)); in test_hypot_DD()
544 StrictMath.log10(Double.MAX_VALUE)); in test_log10_D()
576 StrictMath.log1p(Double.MAX_VALUE)); in test_log1p_D()
950 assertEquals(3.9999999999999996, StrictMath.scalb(Double.MAX_VALUE, in test_scalb_DI()
956 assertEquals(Double.MAX_VALUE, halfMax - StrictMath.ulp(halfMax) in test_scalb_DI()
966 assertEquals(-Double.MAX_VALUE, halfMax + StrictMath.ulp(halfMax) in test_scalb_DI()
981 Double.MAX_VALUE, 1)); in test_scalb_DI()
[all …]
/libcore/luni/src/main/java/java/text/
DNumberFormat.java720 maximumFractionDigits < Byte.MAX_VALUE ? (byte) maximumFractionDigits
721 : Byte.MAX_VALUE);
725 maximumIntegerDigits < Byte.MAX_VALUE ? (byte) maximumIntegerDigits
726 : Byte.MAX_VALUE);
728 minimumFractionDigits < Byte.MAX_VALUE ? (byte) minimumFractionDigits
729 : Byte.MAX_VALUE);
733 … minimumIntegerDigits < Byte.MAX_VALUE ? (byte) minimumIntegerDigits : Byte.MAX_VALUE);
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
DDHGenParameterSpecTest.java43 int[] primes = {Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE}; in testDHGenParameterSpec()
44 int[] exponents = {Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE}; in testDHGenParameterSpec()
/libcore/luni/src/test/java/libcore/java/io/
DOldRandomAccessFileTest.java153 fcr.lock(0L, Long.MAX_VALUE, false); in test_ConstructorLjava_lang_StringLjava_lang_String()
424 raf.writeByte(Byte.MAX_VALUE); in test_read_writeByte()
426 raf.writeByte(Byte.MAX_VALUE + 1); in test_read_writeByte()
434 Byte.MAX_VALUE, raf.readByte()); in test_read_writeByte()
470 raf.writeChar(Character.MAX_VALUE); in test_read_writeChar()
472 raf.writeChar(Character.MAX_VALUE + 1); in test_read_writeChar()
480 Character.MAX_VALUE, raf.readChar()); in test_read_writeChar()
514 raf.writeDouble(Double.MAX_VALUE); in test_read_writeDouble()
519 Double.MAX_VALUE, raf.readDouble()); in test_read_writeDouble()
551 raf.writeFloat(Float.MAX_VALUE); in test_read_writeFloat()
[all …]
/libcore/luni/src/main/java/java/lang/
DMath.java966 } else if (d == Double.MAX_VALUE || d == -Double.MAX_VALUE) { in ulp()
970 return nextafter(d, Double.MAX_VALUE) - d; in ulp()
1000 } else if (f == Float.MAX_VALUE || f == -Float.MAX_VALUE) { in ulp()
1006 int hy = Float.floatToRawIntBits(Float.MAX_VALUE); in ulp()
1091 return (start > 0 ? Float.MAX_VALUE : -Float.MAX_VALUE); in nextAfter()
1093 if ((start == Float.MAX_VALUE && direction > start) in nextAfter()
1094 || (start == -Float.MAX_VALUE && direction < start)) { in nextAfter()

123456789