Home
last modified time | relevance | path

Searched refs:big (Results 1 – 9 of 9) sorted by relevance

/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalTest.java34 BigDecimal big = new BigDecimal(123E04); in test_ConstructorD() local
37 big.toString().equals("1230000")); in test_ConstructorD()
38 big = new BigDecimal(123.375); in test_ConstructorD()
39 assertTrue("init(D) failed for 123.375; became " + big, in test_ConstructorD()
40 big.toString().equals("123.375") ); in test_ConstructorD()
41 big = new BigDecimal(Math.pow(2, -33)); in test_ConstructorD()
42 assertTrue("init(D) failed for 2^(-33) = 1.16415321826934814453125E-10; became " + big, in test_ConstructorD()
43 big.toString().equals("1.16415321826934814453125E-10") ); in test_ConstructorD()
44 big = new BigDecimal(123456 * Math.pow(2, -33)); in test_ConstructorD()
45 … assertTrue("init(D) failed for 123456 * 2^(-33) = 0.000014372169971466064453125; became " + big, in test_ConstructorD()
[all …]
DOldBigDecimalConstructorsTest.java720 BigDecimal big = new BigDecimal(value); in test_Constructor_java_math_BigInteger_int() local
722 big.unscaledValue().equals(value) in test_Constructor_java_math_BigInteger_int()
723 && big.scale() == 0); in test_Constructor_java_math_BigInteger_int()
738 BigDecimal big = new BigDecimal(123E04); in test_Constructor_Double() local
739 assertTrue("the BigDecimal value taking a double argument is not initialized properly", big in test_Constructor_Double()
741 big = new BigDecimal(1.2345E-12); in test_Constructor_Double()
743 big.doubleValue() == 1.2345E-12); in test_Constructor_Double()
744 big = new BigDecimal(-12345E-3); in test_Constructor_Double()
746 big.doubleValue() == -12.345); in test_Constructor_Double()
747 big = new BigDecimal(5.1234567897654321e138); in test_Constructor_Double()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalTest.java39 BigDecimal big = new BigDecimal(value); in test_ConstructorLjava_math_BigInteger() local
40 assertTrue("the BigDecimal value is not initialized properly", big in test_ConstructorLjava_math_BigInteger()
42 && big.scale() == 0); in test_ConstructorLjava_math_BigInteger()
49 BigDecimal big = new BigDecimal(value2, 5); in test_ConstructorLjava_math_BigIntegerI() local
50 assertTrue("the BigDecimal value is not initialized properly", big in test_ConstructorLjava_math_BigIntegerI()
52 && big.scale() == 5); in test_ConstructorLjava_math_BigIntegerI()
53 assertTrue("the BigDecimal value is not represented properly", big in test_ConstructorLjava_math_BigIntegerI()
61 BigDecimal big = new BigDecimal(123E04); in test_ConstructorD() local
64 big.toString().equals("1230000")); in test_ConstructorD()
65 big = new BigDecimal(1.2345E-12); in test_ConstructorD()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DBitSetTest.java207 private static BitSet big() { in big() method in BitSetTest
220 BitSet result = big(); in test_differentSizes()
224 result.and(big()); in test_differentSizes()
227 result = big(); in test_differentSizes()
231 result.andNot(big()); in test_differentSizes()
234 assertFalse(big().intersects(small())); in test_differentSizes()
235 assertFalse(small().intersects(big())); in test_differentSizes()
237 result = big(); in test_differentSizes()
241 result.or(big()); in test_differentSizes()
244 result = big(); in test_differentSizes()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DObjectIdentifier.java289 BigInteger big = BigInteger.valueOf(components[1]); in init() local
290 big = big.add(BigInteger.valueOf(components[0]*40)); in init()
291 pos += pack7Oid(big, tmp, pos); in init()
373 BigInteger big = new BigInteger(pack(encoding, fromPos, i-fromPos+1, 7, 8)); in toIntArray() local
376 BigInteger second = big.subtract(BigInteger.valueOf(80)); in toIntArray()
383 if (big.compareTo(BigInteger.valueOf(Integer.MAX_VALUE)) == 1) { in toIntArray()
386 result[which++] = big.intValue(); in toIntArray()
438 BigInteger big = new BigInteger(pack(encoding, fromPos, i-fromPos+1, 7, 8)); in toString() local
443 sb.append(big.subtract(BigInteger.valueOf(80))); in toString()
445 sb.append(big); in toString()
/libcore/ojluni/src/main/java/sun/misc/
DFDBigInteger.java1027 FDBigInteger big; in addAndCmp() local
1034 big = x; in addAndCmp()
1039 big = y; in addAndCmp()
1049 return this.cmp(big); in addAndCmp()
1057 long top = (big.data[big.nWords - 1] & LONG_MASK); in addAndCmp()
1090 return this.cmp(big.add(small)); in addAndCmp()
1182 FDBigInteger big, small; in add() local
1187 big = this; in add()
1192 big = other; in add()
1201 carry += (i < big.offset ? 0L : (big.data[i - big.offset] & LONG_MASK) ) in add()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DNumberFormatTest.java63 java.math.BigInteger big; in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() local
65 big = new java.math.BigInteger(String.valueOf(Long.MAX_VALUE)) in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
67 out = format.format(big, new StringBuffer(), pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
72 big = new java.math.BigInteger(String.valueOf(Long.MIN_VALUE)) in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
74 out = format.format(big, new StringBuffer(), pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
DDecimalFormatTest.java584 java.math.BigInteger big; in test_formatObject() local
586 big = new java.math.BigInteger(String.valueOf(Long.MAX_VALUE)) in test_formatObject()
588 out = format.format(big, new StringBuffer(), pos); in test_formatObject()
593 big = new java.math.BigInteger(String.valueOf(Long.MIN_VALUE)) in test_formatObject()
595 out = format.format(big, new StringBuffer(), pos); in test_formatObject()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DFormatterTest.java2676 BigInteger big = new BigInteger("100"); in test_formatLjava_lang_String$Ljava_lang_Object_BigIntegerExceptionOrder() local
2701 f.format("%+ .4o", big); in test_formatLjava_lang_String$Ljava_lang_Object_BigIntegerExceptionOrder()
2708 f.format("%+ -o", big); in test_formatLjava_lang_String$Ljava_lang_Object_BigIntegerExceptionOrder()
2715 f.format("%-O", big); in test_formatLjava_lang_String$Ljava_lang_Object_BigIntegerExceptionOrder()