/libcore/luni/src/test/java/libcore/java/math/ |
OldBigIntegerDivideTest.java | 37 BigInteger aNumber = new BigInteger(aSign, aBytes); 40 aNumber.divideAndRemainder(bNumber);
|
OldBigDecimalCompareTest.java | 34 BigDecimal aNumber = new BigDecimal(a); 36 assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toString()); 39 assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toString()); 42 assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toString()); 45 assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toString()); 49 aNumber.abs(mc); 58 BigDecimal aNumber = new BigDecimal(new BigInteger(a), 41); 59 BigDecimal res = aNumber.negate(mc);
|
OldBigIntegerOperateBitsTest.java | 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 41 int result = aNumber.getLowestSetBit(); 55 BigInteger aNumber = new BigInteger(aSign, aBytes); 56 int result = aNumber.getLowestSetBit(); 63 aNumber = new BigInteger(aSign, aBytes_); 64 result = aNumber.getLowestSetBit(); 71 aNumber = new BigInteger(aSign, aBytes__); 72 result = aNumber.getLowestSetBit(); 86 BigInteger aNumber = new BigInteger(aSign, aBytes); 87 int result = aNumber.getLowestSetBit() [all...] |
OldBigDecimalConvertTest.java | 33 BigDecimal aNumber = new BigDecimal(a); 35 aNumber.intValueExact(); 44 BigDecimal aNumber = new BigDecimal(a); 46 aNumber.intValueExact(); 54 BigDecimal aNumber = new BigDecimal("-2147483647.999"); 56 aNumber.intValueExact(); 65 BigDecimal aNumber = new BigDecimal(a); 67 aNumber.intValueExact(); 76 BigDecimal aNumber = new BigDecimal(a); 77 int iNumber = aNumber.intValueExact() [all...] |
OldBigDecimalArithmeticTest.java | 117 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 119 BigDecimal result = aNumber.pow(exp, mc); 330 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 333 BigDecimal result = aNumber.divideToIntegralValue(bNumber); 384 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 387 BigDecimal result[] = aNumber.divideAndRemainder(bNumber); 433 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 436 BigDecimal result = aNumber.remainder(bNumber); 545 BigDecimal aNumber = new BigDecimal(new BigInteger(a)); 547 BigDecimal result = aNumber.divide(bNumber, rm) [all...] |
/libcore/luni/src/test/java/tests/api/java/math/ |
MathContextTest.java | 31 BigDecimal aNumber = new BigDecimal(a); 73 BigDecimal res = aNumber.abs(mcInt6);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
BigIntegerNotTest.java | 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 42 BigInteger result = aNumber.andNot(bNumber); 60 BigInteger aNumber = new BigInteger(aSign, aBytes); 62 BigInteger result = aNumber.andNot(bNumber); 80 BigInteger aNumber = new BigInteger(aSign, aBytes); 82 BigInteger result = aNumber.andNot(bNumber); 100 BigInteger aNumber = new BigInteger(aSign, aBytes); 102 BigInteger result = aNumber.andNot(bNumber); 116 BigInteger aNumber = BigInteger.ZERO; 117 BigInteger result = aNumber.not() [all...] |
BigIntegerToStringTest.java | 38 BigInteger aNumber = new BigInteger(value, radix); 39 String result = aNumber.toString(45); 49 BigInteger aNumber = new BigInteger(value, radix); 50 String result = aNumber.toString(radix); 60 BigInteger aNumber = new BigInteger(value, radix); 61 String result = aNumber.toString(radix); 71 BigInteger aNumber = new BigInteger(value, radix); 72 String result = aNumber.toString(radix); 82 BigInteger aNumber = new BigInteger(value, radix); 83 String result = aNumber.toString(radix) [all...] |
BigDecimalCompareTest.java | 41 BigDecimal aNumber = new BigDecimal(a); 43 assertEquals("incorrect value", result, aNumber.abs().toString()); 51 BigDecimal aNumber = new BigDecimal(a); 53 assertEquals("incorrect value", result, aNumber.abs().toString()); 61 BigDecimal aNumber = new BigDecimal(a); 67 BigDecimal res = aNumber.abs(mc); 77 BigDecimal aNumber = new BigDecimal(a); 83 BigDecimal res = aNumber.abs(mc); 96 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 99 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)) [all...] |
BigIntegerCompareTest.java | 38 BigInteger aNumber = new BigInteger(aSign, aBytes); 39 BigInteger result = aNumber.abs(); 55 BigInteger aNumber = new BigInteger(aSign, aBytes); 56 BigInteger result = aNumber.abs(); 75 BigInteger aNumber = new BigInteger(aSign, aBytes); 77 assertEquals(1, aNumber.compareTo(bNumber)); 90 BigInteger aNumber = new BigInteger(aSign, aBytes); 92 assertEquals(-1, aNumber.compareTo(bNumber)); 104 BigInteger aNumber = new BigInteger(aSign, aBytes); 106 assertEquals(0, aNumber.compareTo(bNumber)) [all...] |
BigIntegerModPowTest.java | 41 BigInteger aNumber = new BigInteger(aSign, aBytes); 45 aNumber.modPow(exp, modulus); 69 BigInteger aNumber = new BigInteger(aSign, aBytes); 72 BigInteger result = aNumber.modPow(exp, modulus); 92 BigInteger aNumber = new BigInteger(aSign, aBytes); 95 BigInteger result = aNumber.modPow(exp, modulus); 135 BigInteger aNumber = new BigInteger(aSign, aBytes); 138 aNumber.modInverse(modulus); 152 BigInteger aNumber = new BigInteger(aSign, aBytes); 155 aNumber.modInverse(modulus) [all...] |
BigIntegerAddTest.java | 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 42 BigInteger result = aNumber.add(bNumber); 60 BigInteger aNumber = new BigInteger(aSign, aBytes); 62 BigInteger result = aNumber.add(bNumber); 82 BigInteger aNumber = new BigInteger(aSign, aBytes); 84 BigInteger result = aNumber.add(bNumber); 104 BigInteger aNumber = new BigInteger(aSign, aBytes); 106 BigInteger result = aNumber.add(bNumber); 126 BigInteger aNumber = new BigInteger(aSign, aBytes); 128 BigInteger result = aNumber.add(bNumber) [all...] |
BigIntegerAndTest.java | 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 42 BigInteger result = aNumber.and(bNumber); 60 BigInteger aNumber = new BigInteger(aSign, aBytes); 62 BigInteger result = aNumber.and(bNumber); 80 BigInteger aNumber = new BigInteger(aSign, aBytes); 82 BigInteger result = aNumber.and(bNumber); 100 BigInteger aNumber = new BigInteger(aSign, aBytes); 102 BigInteger result = aNumber.and(bNumber); 120 BigInteger aNumber = new BigInteger(aSign, aBytes); 122 BigInteger result = aNumber.and(bNumber) [all...] |
BigIntegerMultiplyTest.java | 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 42 BigInteger result = aNumber.multiply(bNumber); 61 BigInteger aNumber = new BigInteger(aSign, aBytes); 63 BigInteger result = aNumber.multiply(bNumber); 83 BigInteger aNumber = new BigInteger(aSign, aBytes); 85 BigInteger result = aNumber.multiply(bNumber); 105 BigInteger aNumber = new BigInteger(aSign, aBytes); 107 BigInteger result = aNumber.multiply(bNumber); 128 BigInteger aNumber = new BigInteger(aSign, aBytes); 130 BigInteger result = aNumber.multiply(bNumber) [all...] |
BigIntegerOrTest.java | 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 42 BigInteger result = aNumber.or(bNumber); 60 BigInteger aNumber = new BigInteger(aSign, aBytes); 62 BigInteger result = aNumber.or(bNumber); 80 BigInteger aNumber = new BigInteger(aSign, aBytes); 82 BigInteger result = aNumber.or(bNumber); 100 BigInteger aNumber = new BigInteger(aSign, aBytes); 102 BigInteger result = aNumber.or(bNumber); 120 BigInteger aNumber = new BigInteger(aSign, aBytes); 122 BigInteger result = aNumber.or(bNumber) [all...] |
BigIntegerSubtractTest.java | 41 BigInteger aNumber = new BigInteger(aSign, aBytes); 43 BigInteger result = aNumber.subtract(bNumber); 62 BigInteger aNumber = new BigInteger(aSign, aBytes); 64 BigInteger result = aNumber.subtract(bNumber); 84 BigInteger aNumber = new BigInteger(aSign, aBytes); 86 BigInteger result = aNumber.subtract(bNumber); 106 BigInteger aNumber = new BigInteger(aSign, aBytes); 108 BigInteger result = aNumber.subtract(bNumber); 127 BigInteger aNumber = new BigInteger(aSign, aBytes); 129 BigInteger result = aNumber.subtract(bNumber) [all...] |
BigIntegerXorTest.java | 38 BigInteger aNumber = new BigInteger(numA); 40 BigInteger result = aNumber.xor(bNumber); 51 BigInteger aNumber = new BigInteger(numA); 53 BigInteger result = aNumber.xor(bNumber); 64 BigInteger aNumber = new BigInteger(numA); 66 BigInteger result = aNumber.xor(bNumber); 77 BigInteger aNumber = new BigInteger(numA); 79 BigInteger result = aNumber.xor(bNumber); 90 BigInteger aNumber = new BigInteger(numA); 92 BigInteger result = aNumber.xor(bNumber) [all...] |
BigDecimalConvertTest.java | 38 BigDecimal aNumber = new BigDecimal(a); 40 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 48 BigDecimal aNumber = new BigDecimal(a); 50 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 58 BigDecimal aNumber = new BigDecimal(a); 60 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 68 BigDecimal aNumber = new BigDecimal(a); 70 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 78 BigDecimal aNumber = new BigDecimal(a); 80 double result = aNumber.doubleValue() [all...] |
BigIntegerOperateBitsTest.java | 36 BigInteger aNumber = new BigInteger("0"); 37 assertEquals(0, aNumber.bitCount()); 44 BigInteger aNumber = new BigInteger("-12378634756382937873487638746283767238657872368748726875"); 45 assertEquals(87, aNumber.bitCount()); 52 BigInteger aNumber = new BigInteger("12378634756343564757582937873487638746283767238657872368748726875"); 53 assertEquals(107, aNumber.bitCount()); 60 BigInteger aNumber = new BigInteger("0"); 61 assertEquals(0, aNumber.bitLength()); 70 BigInteger aNumber = new BigInteger(aSign, aBytes); 71 assertEquals(108, aNumber.bitLength()) [all...] |
BigDecimalScaleOperationsTest.java | 37 BigDecimal aNumber = new BigDecimal(new BigInteger(a)); 38 assertTrue("incorrect scale", aNumber.scale() == cScale); 48 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 49 assertTrue("incorrect scale", aNumber.scale() == cScale); 59 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 60 assertTrue("incorrect scale", aNumber.scale() == cScale); 70 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 71 assertTrue("incorrect scale", aNumber.scale() == cScale); 81 BigDecimal aNumber = new BigDecimal(bNumber, aScale); 82 assertTrue("incorrect unscaled value", aNumber.unscaledValue().equals(bNumber)) [all...] |
BigIntegerDivideTest.java | 39 BigInteger aNumber = new BigInteger(aSign, aBytes); 42 aNumber.divide(bNumber); 54 BigInteger aNumber = new BigInteger(aSign, aBytes); 57 aNumber.divide(bNumber); 72 BigInteger aNumber = new BigInteger(aSign, aBytes); 74 BigInteger result = aNumber.divide(bNumber); 92 BigInteger aNumber = new BigInteger(aSign, aBytes); 94 BigInteger result = aNumber.divide(bNumber); 113 BigInteger aNumber = new BigInteger(aSign, aBytes); 115 BigInteger result = aNumber.divide(bNumber) [all...] |
BigDecimalArithmeticTest.java | 42 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 44 BigDecimal result = aNumber.add(bNumber); 59 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 62 BigDecimal result = aNumber.add(bNumber, mc); 77 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 79 BigDecimal result = aNumber.add(bNumber); 94 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 97 BigDecimal result = aNumber.add(bNumber, mc); 112 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); 114 BigDecimal result = aNumber.add(bNumber) [all...] |
BigDecimalConstructorsTest.java | 71 BigDecimal aNumber = new BigDecimal(bA); 72 assertEquals("incorrect value", bA, aNumber.unscaledValue()); 73 assertEquals("incorrect scale", 0, aNumber.scale()); 90 BigDecimal aNumber = new BigDecimal(bA, aScale); 91 assertEquals("incorrect value", bA, aNumber.unscaledValue()); 92 assertEquals("incorrect scale", aScale, aNumber.scale()); 281 BigDecimal aNumber = new BigDecimal(a); 282 assertEquals("incorrect value", bA, aNumber.unscaledValue()); 283 assertEquals("incorrect scale", aScale, aNumber.scale()); 308 BigDecimal aNumber = new BigDecimal(a) [all...] |
BigIntegerConstructorsTest.java | 53 BigInteger aNumber = new BigInteger(aBytes); 55 resBytes = aNumber.toByteArray(); 59 assertEquals("incorrect sign", 1, aNumber.signum()); 69 BigInteger aNumber = new BigInteger(aBytes); 71 resBytes = aNumber.toByteArray(); 75 assertEquals("incorrect sign", 1, aNumber.signum()); 85 BigInteger aNumber = new BigInteger(aBytes); 87 resBytes = aNumber.toByteArray(); 91 assertEquals("incorrect sign", 1, aNumber.signum()); 101 BigInteger aNumber = new BigInteger(aBytes) [all...] |
BigIntegerConvertTest.java | 38 double aNumber = new BigInteger(a).doubleValue(); 39 assertTrue(aNumber == result); 49 double aNumber = new BigInteger(a).doubleValue(); 50 assertTrue(aNumber == result); 60 double aNumber = new BigInteger(a).doubleValue(); 61 assertTrue(aNumber == result); 71 double aNumber = new BigInteger(a).doubleValue(); 72 assertTrue(aNumber == result); 82 double aNumber = new BigInteger(a).doubleValue(); 83 assertTrue(aNumber == result) [all...] |