Home
last modified time | relevance | path

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

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DMathTest.java570 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 …]
DStrictMathTest.java535 .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/
Dmath_java_only.csv533 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/
DOldBigDecimalArithmeticTest.java98 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 …]
DOldBigDecimalTest.java41 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/
DBigIntegerHashCodeTest.java45 aNumber1.gcd(aNumber2).pow(7); in testSameObject()
DBigIntegerTest.java46 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()
DOldBigIntegerTest.java53 assertTrue("Random number is too big", bi.compareTo(two.pow(70)) < 0); in test_ConstructorILjava_util_Random()
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidStrictMathTest.java300 .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()
DOldAndroidMathTest.java335 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/luni/src/main/native/
Djava_lang_StringToReal.cpp216 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/ojluni/src/main/native/
Djfdlibm.h46 #define pow jpow macro
Dfdlibm.h136 extern double pow __P((double, double));
DStrictMath.c172 NATIVE_METHOD(StrictMath, pow, "(DD)D"),
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java646 public static native double pow(double a, double b); in pow() method in StrictMath
DMath.java653 public static native double pow(double a, double b); in pow() method in Math
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestFractionPrinterParser.java289 int power = (int) Math.pow(10, (9 - maxWidth)); in fixParsedValue()
/libcore/benchmarks/src/benchmarks/regression/
DStrictMathBenchmark.java281 StrictMath.pow(d, d); in timePow()
DMathBenchmark.java341 result = Math.pow(d, d); in timePow()
/libcore/ojluni/src/main/java/java/math/
DBigDecimal.java934 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()
DBigInteger.java2372 @NonNull public BigInteger pow(int exponent) { in pow() method
4040 cacheLine[i] = cacheLine[i - 1].pow(2);
/libcore/ojluni/src/main/java/java/text/
DSimpleDateFormat.java1539 value = (int) (((double) value / 1000) * Math.pow(10, count)); in subFormat()
2640 final double divisor = Math.pow(10, width); in subParse()