/libcore/luni/src/main/java/java/lang/ |
D | RealToString.java | 93 int pow; in convertDouble() local 96 pow = 1 - p; // a denormalized number in convertDouble() 106 pow = e - p; in convertDouble() 110 if (-59 < pow && pow < 6 || (pow == -59 && !mantissaIsZero)) { in convertDouble() 111 longDigitGenerator(f, pow, e == 0, mantissaIsZero, numBits); in convertDouble() 113 bigIntDigitGenerator(f, pow, e == 0, numBits); in convertDouble() 155 int pow; in convertFloat() local 158 pow = 1 - p; // a denormalized number in convertFloat() 161 pow -= 2; in convertFloat() 172 pow = e - p; in convertFloat() [all …]
|
D | Math.java | 633 public static native double pow(double x, double y); in pow() method in Math 951 return pow(2, 971); in ulp() 985 return (float) pow(2, 104); in ulp()
|
D | StrictMath.java | 613 public static native double pow(double x, double y); in pow() method in StrictMath 891 return pow(2, 971); in ulp()
|
/libcore/luni/src/main/java/java/math/ |
D | Multiplication.java | 127 return BigInteger.TEN.pow(intExp); in powerOf10() 135 res = bigFivePows[1].pow(intExp).shiftLeft(intExp); in powerOf10() 144 BigInteger powerOfFive = bigFivePows[1].pow(Integer.MAX_VALUE); in powerOf10() 153 res = res.multiply(bigFivePows[1].pow(intExp)); in powerOf10() 184 return val.multiply(bigFivePows[1].pow(exp)); in multiplyByFivePow()
|
D | BigDecimal.java | 1610 public BigDecimal pow(int n) { in pow() method in BigDecimal 1620 : new BigDecimal(getUnscaledValue().pow(n), safeLongToInt(newScale)); in pow() 1635 public BigDecimal pow(int n, MathContext mc) { in pow() method in BigDecimal 1646 return pow(n); in pow()
|
D | BigInteger.java | 903 public BigInteger pow(int exp) { in pow() method in BigInteger
|
/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() 1063 + ",-0.0)=+1.0", 1.0, Math.pow(dval, NZERO)); in test_powDD() 1065 + ",-0.0)=+1.0", 1.0, Math.pow(nagateDval, NZERO)); in test_powDD() 1067 + ",+0.0)=+1.0", 1.0, Math.pow(dval, +0.0)); in test_powDD() 1069 + ",+0.0)=+1.0", 1.0, Math.pow(nagateDval, +0.0)); in test_powDD() 1074 + dval, dval, Math.pow(dval, 1.0)); in test_powDD() 1076 + ")=" + nagateDval, nagateDval, Math.pow(nagateDval, 1.0)); in test_powDD() 1080 + ")=" + Double.NaN, Double.NaN, Math.pow(dval, Double.NaN)); in test_powDD() 1082 + Double.NaN + ")=" + Double.NaN, Double.NaN, Math.pow(nagateDval, in test_powDD() 1090 + 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() 889 (long) StrictMath.pow(2, 8) == 256l); in test_powDD() 891 StrictMath.pow(2, -8) == 0.00390625d); in test_powDD() 1335 2, StrictMath.sqrt(StrictMath.pow(StrictMath.sqrt(2), 4)), 0.0); in test_sqrtD() 1436 assertEquals("Returned incorrect value", StrictMath.pow(2, 971), in test_ulp_D() 1438 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); 356 assertTrue("Incorrect exponent returned for 2**10", two.pow(10).equals( in test_powI() 358 assertTrue("Incorrect exponent returned for 2**70", two.pow(30) in test_powI() 359 .multiply(two.pow(40)).equals(twoToTheSeventy)); in test_powI() 360 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/luni/src/main/native/ |
D | java_lang_Math.cpp | 79 return pow(a, b); in Math_pow() 140 NATIVE_METHOD(Math, pow, "!(DD)D"),
|
D | java_lang_StringToReal.cpp | 273 result = toDoubleHighPrecision (f, length) * pow (10.0, e); in createDouble1() 297 result = toDoubleHighPrecision (f, length) / pow (10.0, -e); in createDouble1() 303 result = toDoubleHighPrecision (f, length) * pow (10.0, e + 52); in createDouble1() 304 result = result * pow (10.0, -52); in createDouble1() 704 result = (jfloat) (toDoubleHighPrecision (f, length) * pow (10.0, (double) e)); in createFloat1() 724 dresult = toDoubleHighPrecision (f, length) / pow (10.0, (double) -e); in createFloat1()
|
D | java_lang_StrictMath.cpp | 139 NATIVE_METHOD(StrictMath, pow, "!(DD)D"),
|
/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 | 295 assertEquals(14.0, Math.log10(Math.pow(10, 14))); in testLog10D() 411 (long) Math.pow(2, 8) == 256l); in testPowDD() 413 Math.pow(2, -8) == 0.00390625d); in testPowDD() 415 2, Math.sqrt(Math.pow(Math.sqrt(2), 4)), 0); in testPowDD() 602 assertEquals("Returned incorrect value", Math.pow(2, 971), Math in testUlpD() 604 assertEquals("Returned incorrect value", Math.pow(2, 971), Math in testUlpD()
|
/libcore/luni/src/main/java/java/util/ |
D | Formatter.java | 2171 if (d >= 1 && d < Math.pow(10, precision)) { in transformG() 2172 if (l < Math.pow(10, precision)) { in transformG() 2176 l = Math.round(d * Math.pow(10, precision + 1)); in transformG() 2184 if (d >= Math.pow(10, -4) && d < 1) { in transformG() 2192 if (l >= Math.pow(10, precision - 4)) { in transformG()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StrictMathBenchmark.java | 251 StrictMath.pow(d, d); in timePow()
|
D | MathBenchmark.java | 345 result = Math.pow(d, d); in timePow()
|
/libcore/luni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 974 final double divisor = Math.pow(10, numDigitsParsed); in parseFractionalSeconds()
|