Home
last modified time | relevance | path

Searched refs:aNumber (Results 1 – 22 of 22) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConvertTest.java38 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValueZero() local
39 assertTrue(aNumber == result); in testDoubleValueZero()
49 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValuePositive1() local
50 assertTrue(aNumber == result); in testDoubleValuePositive1()
60 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValuePositive2() local
61 assertTrue(aNumber == result); in testDoubleValuePositive2()
71 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValueNegative1() local
72 assertTrue(aNumber == result); in testDoubleValueNegative1()
82 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValueNegative2() local
83 assertTrue(aNumber == result); in testDoubleValueNegative2()
[all …]
DBigDecimalConvertTest.java38 BigDecimal aNumber = new BigDecimal(a); in testDoubleValueNeg() local
40 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValueNeg()
48 BigDecimal aNumber = new BigDecimal(a); in testDoubleValuePos() local
50 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValuePos()
58 BigDecimal aNumber = new BigDecimal(a); in testDoubleValuePosInfinity() local
60 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValuePosInfinity()
68 BigDecimal aNumber = new BigDecimal(a); in testDoubleValueNegInfinity() local
70 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); in testDoubleValueNegInfinity()
78 BigDecimal aNumber = new BigDecimal(a); in testDoubleValueMinusZero() local
80 double result = aNumber.doubleValue(); in testDoubleValueMinusZero()
[all …]
DBigIntegerConstructorsTest.java53 BigInteger aNumber = new BigInteger(aBytes); in testConstructorBytesPositive1() local
55 resBytes = aNumber.toByteArray(); in testConstructorBytesPositive1()
59 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive1()
69 BigInteger aNumber = new BigInteger(aBytes); in testConstructorBytesPositive2() local
71 resBytes = aNumber.toByteArray(); in testConstructorBytesPositive2()
75 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive2()
85 BigInteger aNumber = new BigInteger(aBytes); in testConstructorBytesPositive3() local
87 resBytes = aNumber.toByteArray(); in testConstructorBytesPositive3()
91 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive3()
101 BigInteger aNumber = new BigInteger(aBytes); in testConstructorBytesPositive() local
[all …]
DBigIntegerOperateBitsTest.java36 BigInteger aNumber = new BigInteger("0"); in testBitCountZero() local
37 assertEquals(0, aNumber.bitCount()); in testBitCountZero()
44 … BigInteger aNumber = new BigInteger("-12378634756382937873487638746283767238657872368748726875"); in testBitCountNeg() local
45 assertEquals(87, aNumber.bitCount()); in testBitCountNeg()
52 …BigInteger aNumber = new BigInteger("1237863475634356475758293787348763874628376723865787236874872… in testBitCountPos() local
53 assertEquals(107, aNumber.bitCount()); in testBitCountPos()
60 BigInteger aNumber = new BigInteger("0"); in testBitLengthZero() local
61 assertEquals(0, aNumber.bitLength()); in testBitLengthZero()
70 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive1() local
71 assertEquals(108, aNumber.bitLength()); in testBitLengthPositive1()
[all …]
DBigIntegerCompareTest.java38 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAbsPositive() local
39 BigInteger result = aNumber.abs(); in testAbsPositive()
55 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAbsNegative() local
56 BigInteger result = aNumber.abs(); in testAbsNegative()
75 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos1() local
77 assertEquals(1, aNumber.compareTo(bNumber)); in testCompareToPosPos1()
90 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos2() local
92 assertEquals(-1, aNumber.compareTo(bNumber)); in testCompareToPosPos2()
104 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToEqualPos() local
106 assertEquals(0, aNumber.compareTo(bNumber)); in testCompareToEqualPos()
[all …]
DBigIntegerToStringTest.java38 BigInteger aNumber = new BigInteger(value, radix); in testRadixOutOfRange() local
39 String result = aNumber.toString(45); in testRadixOutOfRange()
49 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Neg() local
50 String result = aNumber.toString(radix); in testRadix2Neg()
60 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Pos() local
61 String result = aNumber.toString(radix); in testRadix2Pos()
71 BigInteger aNumber = new BigInteger(value, radix); in testRadix10Neg() local
72 String result = aNumber.toString(radix); in testRadix10Neg()
82 BigInteger aNumber = new BigInteger(value, radix); in testRadix10Pos() local
83 String result = aNumber.toString(radix); in testRadix10Pos()
[all …]
DBigDecimalCompareTest.java41 BigDecimal aNumber = new BigDecimal(a); in testAbsNeg() local
43 assertEquals("incorrect value", result, aNumber.abs().toString()); in testAbsNeg()
51 BigDecimal aNumber = new BigDecimal(a); in testAbsPos() local
53 assertEquals("incorrect value", result, aNumber.abs().toString()); in testAbsPos()
61 BigDecimal aNumber = new BigDecimal(a); in testAbsMathContextNeg() local
67 BigDecimal res = aNumber.abs(mc); in testAbsMathContextNeg()
77 BigDecimal aNumber = new BigDecimal(a); in testAbsMathContextPos() local
83 BigDecimal res = aNumber.abs(mc); in testAbsMathContextPos()
96 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testCompareEqualScale1() local
99 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareEqualScale1()
[all …]
DBigIntegerXorTest.java38 BigInteger aNumber = new BigInteger(numA); in testZeroPos() local
40 BigInteger result = aNumber.xor(bNumber); in testZeroPos()
51 BigInteger aNumber = new BigInteger(numA); in testZeroNeg() local
53 BigInteger result = aNumber.xor(bNumber); in testZeroNeg()
64 BigInteger aNumber = new BigInteger(numA); in testPosZero() local
66 BigInteger result = aNumber.xor(bNumber); in testPosZero()
77 BigInteger aNumber = new BigInteger(numA); in testNegPos() local
79 BigInteger result = aNumber.xor(bNumber); in testNegPos()
90 BigInteger aNumber = new BigInteger(numA); in testZeroZero() local
92 BigInteger result = aNumber.xor(bNumber); in testZeroZero()
[all …]
DBigDecimalConstructorsTest.java71 BigDecimal aNumber = new BigDecimal(bA); in testConstrBI() local
72 assertEquals("incorrect value", bA, aNumber.unscaledValue()); in testConstrBI()
73 assertEquals("incorrect scale", 0, aNumber.scale()); in testConstrBI()
90 BigDecimal aNumber = new BigDecimal(bA, aScale); in testConstrBIScale() local
91 assertEquals("incorrect value", bA, aNumber.unscaledValue()); in testConstrBIScale()
92 assertEquals("incorrect scale", aScale, aNumber.scale()); in testConstrBIScale()
281 BigDecimal aNumber = new BigDecimal(a); in testConstrDouble() local
282 assertEquals("incorrect value", bA, aNumber.unscaledValue()); in testConstrDouble()
283 assertEquals("incorrect scale", aScale, aNumber.scale()); in testConstrDouble()
308 BigDecimal aNumber = new BigDecimal(a); in testConstrDouble01() local
[all …]
DBigIntegerDivideTest.java39 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1() local
42 aNumber.divide(bNumber); in testCase1()
54 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2() local
57 aNumber.divide(bNumber); in testCase2()
72 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3() local
74 BigInteger result = aNumber.divide(bNumber); in testCase3()
92 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase4() local
94 BigInteger result = aNumber.divide(bNumber); in testCase4()
113 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase5() local
115 BigInteger result = aNumber.divide(bNumber); in testCase5()
[all …]
DBigIntegerAddTest.java40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1() local
42 BigInteger result = aNumber.add(bNumber); in testCase1()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2() local
62 BigInteger result = aNumber.add(bNumber); in testCase2()
82 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3() local
84 BigInteger result = aNumber.add(bNumber); in testCase3()
104 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase4() local
106 BigInteger result = aNumber.add(bNumber); in testCase4()
126 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase5() local
128 BigInteger result = aNumber.add(bNumber); in testCase5()
[all …]
DBigIntegerAndTest.java40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroPos() local
42 BigInteger result = aNumber.and(bNumber); in testZeroPos()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroNeg() local
62 BigInteger result = aNumber.and(bNumber); in testZeroNeg()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testPosZero() local
82 BigInteger result = aNumber.and(bNumber); in testPosZero()
100 BigInteger aNumber = new BigInteger(aSign, aBytes); in testNegPos() local
102 BigInteger result = aNumber.and(bNumber); in testNegPos()
120 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroZero() local
122 BigInteger result = aNumber.and(bNumber); in testZeroZero()
[all …]
DBigIntegerSubtractTest.java41 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1() local
43 BigInteger result = aNumber.subtract(bNumber); in testCase1()
62 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2() local
64 BigInteger result = aNumber.subtract(bNumber); in testCase2()
84 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3() local
86 BigInteger result = aNumber.subtract(bNumber); in testCase3()
106 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase4() local
108 BigInteger result = aNumber.subtract(bNumber); in testCase4()
127 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase5() local
129 BigInteger result = aNumber.subtract(bNumber); in testCase5()
[all …]
DBigIntegerNotTest.java40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAndNotPosPosFirstLonger() local
42 BigInteger result = aNumber.andNot(bNumber); in testAndNotPosPosFirstLonger()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAndNotPosPosFirstShorter() local
62 BigInteger result = aNumber.andNot(bNumber); in testAndNotPosPosFirstShorter()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAndNotNegNegFirstLonger() local
82 BigInteger result = aNumber.andNot(bNumber); in testAndNotNegNegFirstLonger()
100 BigInteger aNumber = new BigInteger(aSign, aBytes); in testNegPosFirstLonger() local
102 BigInteger result = aNumber.andNot(bNumber); in testNegPosFirstLonger()
116 BigInteger aNumber = BigInteger.ZERO; in testNotZero() local
117 BigInteger result = aNumber.not(); in testNotZero()
[all …]
DBigIntegerModPowTest.java41 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowException() local
45 aNumber.modPow(exp, modulus); in testModPowException()
69 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowPosExp() local
72 BigInteger result = aNumber.modPow(exp, modulus); in testModPowPosExp()
92 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowNegExp() local
95 BigInteger result = aNumber.modPow(exp, modulus); in testModPowNegExp()
135 BigInteger aNumber = new BigInteger(aSign, aBytes); in testmodInverseException() local
138 aNumber.modInverse(modulus); in testmodInverseException()
152 BigInteger aNumber = new BigInteger(aSign, aBytes); in testmodInverseNonInvertible() local
155 aNumber.modInverse(modulus); in testmodInverseNonInvertible()
[all …]
DBigIntegerOrTest.java40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroPos() local
42 BigInteger result = aNumber.or(bNumber); in testZeroPos()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroNeg() local
62 BigInteger result = aNumber.or(bNumber); in testZeroNeg()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testPosZero() local
82 BigInteger result = aNumber.or(bNumber); in testPosZero()
100 BigInteger aNumber = new BigInteger(aSign, aBytes); in testNegPos() local
102 BigInteger result = aNumber.or(bNumber); in testNegPos()
120 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroZero() local
122 BigInteger result = aNumber.or(bNumber); in testZeroZero()
[all …]
DMathContextTest.java31 BigDecimal aNumber = new BigDecimal(a); in test_MathContextConstruction() local
73 BigDecimal res = aNumber.abs(mcInt6); in test_MathContextConstruction()
DBigDecimalTest.java922 BigDecimal aNumber = new BigDecimal(a); in testMathContextConstruction() local
928 BigDecimal res = aNumber.abs(mcInt); in testMathContextConstruction()
/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalConvertTest.java33 BigDecimal aNumber = new BigDecimal(a); in test_IntValueExactNeg() local
35 aNumber.intValueExact(); in test_IntValueExactNeg()
44 BigDecimal aNumber = new BigDecimal(a); in test_IntValueExactPos() local
46 aNumber.intValueExact(); in test_IntValueExactPos()
54 BigDecimal aNumber = new BigDecimal("-2147483647.999"); in test_IntValueExactFloatNeg() local
56 aNumber.intValueExact(); in test_IntValueExactFloatNeg()
65 BigDecimal aNumber = new BigDecimal(a); in test_IntValueExactFloatPos() local
67 aNumber.intValueExact(); in test_IntValueExactFloatPos()
76 BigDecimal aNumber = new BigDecimal(a); in test_IntValueExactLongPos() local
77 int iNumber = aNumber.intValueExact(); in test_IntValueExactLongPos()
[all …]
DOldBigDecimalCompareTest.java34 BigDecimal aNumber = new BigDecimal(a); in testAbsMathContextNeg() local
36 …assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg()
39 …assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg()
42 …assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg()
45 …assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg()
49 aNumber.abs(mc); in testAbsMathContextNeg()
58 BigDecimal aNumber = new BigDecimal(new BigInteger(a), 41); in testNegateMathContextPositive() local
59 BigDecimal res = aNumber.negate(mc); in testNegateMathContextPositive()
DOldBigDecimalArithmeticTest.java117 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testPowMathContext() local
119 BigDecimal result = aNumber.pow(exp, mc); in testPowMathContext()
330 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testDivideToIntegralValueByZero() local
333 BigDecimal result = aNumber.divideToIntegralValue(bNumber); in testDivideToIntegralValueByZero()
384 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testDivideAndRemainderByZero() local
387 BigDecimal result[] = aNumber.divideAndRemainder(bNumber); in testDivideAndRemainderByZero()
433 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testRemainderByZero() local
436 BigDecimal result = aNumber.remainder(bNumber); in testRemainderByZero()
545 BigDecimal aNumber = new BigDecimal(new BigInteger(a)); in test_DivideBigDecimalRoundingModeUP() local
547 BigDecimal result = aNumber.divide(bNumber, rm); in test_DivideBigDecimalRoundingModeUP()
[all …]
DOldBigIntegerDivideTest.java37 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase21byZero() local
40 aNumber.divideAndRemainder(bNumber); in testCase21byZero()