/libcore/benchmarks/src/benchmarks/ |
D | BigIntegerBenchmark.java | 54 BigInteger big = BigInteger.TEN.pow(prec).shiftLeft(30).add(BigInteger.ONE); in inner() 78 BigInteger scaledOne = BigInteger.TEN.pow(prec); in harmonic1000() 140 BigInteger scaledOne = BigInteger.TEN.pow(prec); in eApprox() 165 BigInteger odd1 = BigInteger.TEN.pow(len / 2).add(BigInteger.ONE); in repeatModPow() 166 BigInteger odd2 = BigInteger.TEN.pow(len / 2).add(BigInteger.valueOf(17)); in repeatModPow() 168 BigInteger exponent = BigInteger.TEN.pow(len / 2 - 1); in repeatModPow() 169 BigInteger base = BigInteger.TEN.pow(len / 4); in repeatModPow() 193 BigInteger odd1 = BigInteger.TEN.pow(len / 2).add(BigInteger.ONE); in repeatModInverse() 194 BigInteger odd2 = BigInteger.TEN.pow(len / 2).add(BigInteger.valueOf(17)); in repeatModInverse()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | MathTest.java | 570 assertEquals(14.0, Math.log10(Math.pow(10, 14))); in test_log10_D() 1153 + ",-0.0)=+1.0", 1.0, Math.pow(dval, NZERO)); in test_powDD() 1155 + ",-0.0)=+1.0", 1.0, Math.pow(negateDval, NZERO)); in test_powDD() 1157 + ",+0.0)=+1.0", 1.0, Math.pow(dval, +0.0)); in test_powDD() 1159 + ",+0.0)=+1.0", 1.0, Math.pow(negateDval, +0.0)); in test_powDD() 1164 + dval, dval, Math.pow(dval, 1.0)); in test_powDD() 1166 + ")=" + negateDval, negateDval, Math.pow(negateDval, 1.0)); in test_powDD() 1174 + ")=" + answer, answer, Math.pow(dval, Double.NaN)); in test_powDD() 1179 + Double.NaN + ")=" + Double.NaN, Double.NaN, Math.pow(negateDval, in test_powDD() 1187 + dval + ")=" + Double.NaN, Double.NaN, Math.pow(Double.NaN, dval)); in test_powDD() [all …]
|
D | StrictMathTest.java | 535 .pow(10, 14))); in test_log10_D() 953 (long) StrictMath.pow(2, 8) == 256l); in test_powDD() 955 StrictMath.pow(2, -8) == 0.00390625d); in test_powDD() 1399 2, StrictMath.sqrt(StrictMath.pow(StrictMath.sqrt(2), 4)), 0.0); in test_sqrtD() 1500 assertEquals("Returned incorrect value", StrictMath.pow(2, 971), in test_ulp_D() 1502 assertEquals("Returned incorrect value", StrictMath.pow(2, 971), in test_ulp_D()
|
/libcore/luni/src/test/resources/ |
D | math_java_only.csv | 533 pow,NaN,-0x1.3543856880754p-1,0x1.35716fc87723bp0 534 pow,0x1.1d4a986c89024p0,0x1.43ced9e886399p-3,-0x1.e126d87d20ed6p-5 535 pow,0x1.522cbcdf959dep1,0x1.3c7d675466f15p-1,-0x1.0284cd3f0c777p1 536 pow,0x1.b9bb1a3e302d4p4,0x1.5b6d1c408c6b9p-3,-0x1.decec1eac9a7cp0 537 pow,0x1.73657e5443b04p15,0x1.b14dd1bdae0bp2,0x1.685fb1288c6ebp2 538 pow,0x1.42aabebdcc329p-3,0x1.dbac3718db8c6p2,-0x1.d7b5616fb60a8p-1 539 pow,NaN,-0x1.02396705ce823p1,-0x1.8534721a7fab8p-1 540 pow,0x1.0d1bfde3040d9p0,0x1.0bcf497703256p0,0x1.1b7acc031c2b8p0 541 pow,NaN,-0x1.673a84a184115p-1,0x1.da2090fb36b4ap0 542 pow,NaN,-0x1.0acacaef8fc6ap0,-0x1.608b00fd22779p-1 [all …]
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalArithmeticTest.java | 98 res = a.pow(-1); in testPowNonTrivial() 104 res = a.pow(-103); in testPowNonTrivial() 119 BigDecimal result = aNumber.pow(exp, mc); in testPowMathContext() 131 a.round(mc).pow(1000).round(mc).toString()); in testPowMathContextNonTrivial() 132 res = a.pow(1000, mc); in testPowMathContextNonTrivial() 138 a.round(mc).pow(1000).round(mc).toString()); in testPowMathContextNonTrivial() 139 res = a.pow(1000, mc); in testPowMathContextNonTrivial() 145 res = a.pow(-2, mc); in testPowMathContextNonTrivial() 153 res = a.pow(-2, mc); in testPowMathContextNonTrivial() 159 res = a.pow(-1, mc); in testPowMathContextNonTrivial() [all …]
|
D | OldBigDecimalTest.java | 41 big = new BigDecimal(Math.pow(2, -33)); in test_ConstructorD() 44 big = new BigDecimal(123456 * Math.pow(2, -33)); in test_ConstructorD() 47 big = new BigDecimal(-123456 * Math.pow(2, -33)); in test_ConstructorD()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerMultiplyTest.java | 285 aNumber.pow(exp); in testPowException() 303 BigInteger result = aNumber.pow(exp); in testPowNegativeNumToOddExp() 323 BigInteger result = aNumber.pow(exp); in testPowNegativeNumToEvenExp() 341 BigInteger result = aNumber.pow(exp); in testPowNegativeNumToZeroExp() 362 BigInteger result = aNumber.pow(exp); in testPowPositiveNum() 380 BigInteger result = aNumber.pow(exp); in testPowPositiveNumToZeroExp()
|
D | BigIntegerHashCodeTest.java | 45 aNumber1.gcd(aNumber2).pow(7); in testSameObject()
|
D | BigIntegerTest.java | 46 BigInteger twoToTheSeventy = two.pow(70); 352 assertTrue("Incorrect exponent returned for 2**10", two.pow(10).equals( in test_powI() 354 assertTrue("Incorrect exponent returned for 2**70", two.pow(30) in test_powI() 355 .multiply(two.pow(40)).equals(twoToTheSeventy)); in test_powI() 356 assertTrue("Incorrect exponent returned for 10**50", ten.pow(50) in test_powI()
|
D | OldBigIntegerTest.java | 53 assertTrue("Random number is too big", bi.compareTo(two.pow(70)) < 0); in test_ConstructorILjava_util_Random()
|
D | BigDecimalArithmeticTest.java | 430 BigDecimal result = aNumber.pow(exp); in testPow() 445 BigDecimal result = aNumber.pow(exp); in testPow0() 456 BigDecimal result = BigDecimal.ZERO.pow(0); in testZeroPow0() 472 BigDecimal result = aNumber.pow(exp, mc); in testPowMathContext()
|
/libcore/ojluni/src/main/native/ |
D | Math.c | 91 return pow(d1, d2); in Math_pow() 161 FAST_NATIVE_METHOD(Math, pow, "(DD)D"),
|
D | jfdlibm.h | 46 #define pow jpow macro
|
D | fdlibm.h | 136 extern double pow __P((double, double));
|
D | StrictMath.c | 172 NATIVE_METHOD(StrictMath, pow, "(DD)D"),
|
/libcore/luni/src/main/native/ |
D | java_lang_StringToReal.cpp | 216 result = toDoubleHighPrecision (f, length) * pow (10.0, e); in createDouble1() 240 result = toDoubleHighPrecision (f, length) / pow (10.0, -e); in createDouble1() 246 result = toDoubleHighPrecision (f, length) * pow (10.0, e + 52); in createDouble1() 247 result = result * pow (10.0, -52); in createDouble1() 601 result = (jfloat) (toDoubleHighPrecision (f, length) * pow (10.0, (double) e)); in createFloat1() 621 dresult = toDoubleHighPrecision (f, length) / pow (10.0, (double) -e); in createFloat1()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidStrictMathTest.java | 300 .pow(10, 14))); in testLog10D() 428 (long) StrictMath.pow(2, 8) == 256l); in testPowDD() 430 StrictMath.pow(2, -8) == 0.00390625d); in testPowDD() 543 2, StrictMath.sqrt(StrictMath.pow(StrictMath.sqrt(2), 4)), 0.0); in testSqrtD() 626 assertEquals("Returned incorrect value", StrictMath.pow(2, 971), in testUlp_D() 628 assertEquals("Returned incorrect value", StrictMath.pow(2, 971), in testUlp_D()
|
D | OldAndroidMathTest.java | 335 assertEquals(14.0, Math.log10(Math.pow(10, 14))); in testLog10D() 451 (long) Math.pow(2, 8) == 256l); in testPowDD() 453 Math.pow(2, -8) == 0.00390625d); in testPowDD() 455 2, Math.sqrt(Math.pow(Math.sqrt(2), 4)), 0); in testPowDD() 642 assertEquals("Returned incorrect value", Math.pow(2, 971), Math in testUlpD() 644 assertEquals("Returned incorrect value", Math.pow(2, 971), Math in testUlpD()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 646 public static native double pow(double a, double b); in pow() method in StrictMath
|
D | Math.java | 653 public static native double pow(double a, double b); in pow() method in Math
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestFractionPrinterParser.java | 289 int power = (int) Math.pow(10, (9 - maxWidth)); in fixParsedValue()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StrictMathBenchmark.java | 281 StrictMath.pow(d, d); in timePow()
|
D | MathBenchmark.java | 341 result = Math.pow(d, d); in timePow()
|
/libcore/ojluni/src/main/java/java/math/ |
D | BigDecimal.java | 934 intVal = BigInteger.valueOf(5).pow(-exponent).multiply(compactVal); in BigDecimal() 937 intVal = BigInteger.valueOf(2).pow(exponent).multiply(compactVal); in BigDecimal() 2011 public BigDecimal pow(int n) { in pow() method in BigDecimal 2017 return new BigDecimal(this.inflated().pow(n), newScale); in pow() 2071 public BigDecimal pow(int n, MathContext mc) { in pow() method in BigDecimal 2073 return pow(n); in pow() 3574 return BigInteger.TEN.pow(n); in bigTenToThe()
|
/libcore/ojluni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 1539 value = (int) (((double) value / 1000) * Math.pow(10, count)); in subFormat() 2640 final double divisor = Math.pow(10, width); in subParse()
|