/libcore/luni/src/main/java/java/math/ |
D | Multiplication.java | 104 static BigInteger multiplyByTenPow(BigInteger val, long exp) { in multiplyByTenPow() argument 106 return ((exp < tenPows.length) in multiplyByTenPow() 107 ? multiplyByPositiveInt(val, tenPows[(int)exp]) in multiplyByTenPow() 108 : val.multiply(powerOf10(exp))); in multiplyByTenPow() 118 static BigInteger powerOf10(long exp) { in powerOf10() argument 120 int intExp = (int)exp; in powerOf10() 122 if (exp < bigTenPows.length) { in powerOf10() 125 } else if (exp <= 50) { in powerOf10() 133 if (exp <= Integer.MAX_VALUE) { in powerOf10() 146 long longExp = exp - Integer.MAX_VALUE; in powerOf10() [all …]
|
D | BigInteger.java | 903 public BigInteger pow(int exp) { in pow() argument 904 if (exp < 0) { in pow() 905 throw new ArithmeticException("exp < 0: " + exp); in pow() 907 return new BigInteger(BigInt.exp(getBigInt(), exp)); in pow()
|
D | BigDecimal.java | 1440 long exp = Math.min(-diffScale, Math.max((long)mcPrecision - diffPrecision, 0)); in divideToIntegralValue() local 1443 quotAndRem = this.getUnscaledValue().multiply(Multiplication.powerOf10(exp)). in divideToIntegralValue() 1445 newScale += exp; // To fix the scale in divideToIntegralValue() 1446 exp = -newScale; // The remaining power of ten in divideToIntegralValue() 1448 if ((quotAndRem[1].signum() != 0) && (exp > 0)) { in divideToIntegralValue() 1451 + exp - divisor.precision(); in divideToIntegralValue() 1454 quotAndRem[1] = quotAndRem[1].multiply(Multiplication.powerOf10(exp)). in divideToIntegralValue()
|
D | BigInt.java | 290 static BigInt exp(BigInt a, int p) { in exp() method in BigInt
|
/libcore/luni/src/test/resources/ |
D | math_tests.csv | 4538 exp,0x1.0000000000002p0,0x1.ffffffffffffep-52 4539 exp,0x1.000000000012p0,0x1.1ffffffffff5ep-44 4540 exp,0x1.000000000208p0,0x1.03fffffffef7fp-39 4541 exp,0x1.00000000c1b59p0,0x1.836b2fff6d6cbp-33 4542 exp,0x1.000000033d397p0,0x1.9e9cbbfd6080bp-31 4543 exp,0x1.003af6c37c1d3p0,0x1.d77fd13d27fffp-11 4544 exp,0x1.016b4df3299d8p0,0x1.6a4d1af9cc989p-8 4545 exp,0x1.0ca4a41663fep0,0x1.8ae823850230bp-5 4546 exp,0x1.1538ea18a4585p0,0x1.46370d915991bp-4 4547 exp,0x1.47408cb9583cep0,0x1.f6e4c3ced7c72p-3 [all …]
|
D | math_important_numbers.csv | 256 exp,0x1.e4efb75e4527ap3,0x1.5bf0a8b145769p1,2.718281828459045 257 exp,0x1.0e49787e20548p-4,-0x1.5bf0a8b145769p1,-2.718281828459045 258 exp,0x1.0p0,0x0.0p0,0.0 259 exp,0x1.0p0,-0x0.0p0,-0.0 260 exp,0x1.5bf0a8b14576ap1,0x1.0p0,1.0 261 exp,0x1.78b56362cef38p-2,-0x1.0p0,-1.0 262 exp,0x1.368b2fc6f960ap-1,-0x1.0p-1,-0.5 263 exp,0x1.a61298e1e069cp0,0x1.0p-1,0.5 264 exp,0x1.e989f5d6dff5ep-10,-0x1.921fb54442d18p2,-6.283185307179586 265 exp,0x1.3e0545d310facp-9,-0x1.815e630c155e1p2,-6.021385919380436 [all …]
|
/libcore/luni/src/main/native/ |
D | NetFd.h | 58 #define NET_FAILURE_RETRY(fd, exp) ({ \ argument 59 typeof (exp) _rc; \ 61 _rc = (exp); \
|
D | java_lang_Math.cpp | 51 return exp(a); in Math_exp() 132 NATIVE_METHOD(Math, exp, "!(D)D"),
|
D | java_lang_StrictMath.cpp | 131 NATIVE_METHOD(StrictMath, exp, "!(D)D"),
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerModPowTest.java | 42 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowException() local 45 aNumber.modPow(exp, modulus); in testModPowException() 70 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowPosExp() local 72 BigInteger result = aNumber.modPow(exp, modulus); in testModPowPosExp() 93 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowNegExp() local 95 BigInteger result = aNumber.modPow(exp, modulus); in testModPowNegExp() 105 BigInteger exp = new BigInteger("0"); in testModPowZeroExp() local 111 assertEquals(base[i] + " modePow(" + exp + ", " + mod[j] in testModPowZeroExp() 113 base[i].modPow(exp, mod[j])); in testModPowZeroExp() 120 assertEquals(base[i] + " modePow(" + exp + ", " + mod[j] in testModPowZeroExp() [all …]
|
D | BigIntegerMultiplyTest.java | 282 int exp = -5; in testPowException() local 285 aNumber.pow(exp); in testPowException() 297 int exp = 5; in testPowNegativeNumToOddExp() local 303 BigInteger result = aNumber.pow(exp); in testPowNegativeNumToOddExp() 318 int exp = 4; in testPowNegativeNumToEvenExp() local 323 BigInteger result = aNumber.pow(exp); in testPowNegativeNumToEvenExp() 338 int exp = 0; in testPowNegativeNumToZeroExp() local 341 BigInteger result = aNumber.pow(exp); in testPowNegativeNumToZeroExp() 356 int exp = 5; in testPowPositiveNum() local 362 BigInteger result = aNumber.pow(exp); in testPowPositiveNum() [all …]
|
D | BigDecimalArithmeticTest.java | 423 int exp = 10; in testPow() local 430 BigDecimal result = aNumber.pow(exp); in testPow() 441 int exp = 0; in testPow0() local 445 BigDecimal result = aNumber.pow(exp); in testPow0() 467 int exp = 10; in testPowMathContext() local 472 BigDecimal result = aNumber.pow(exp, mc); in testPowMathContext()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
D | DESedeKeySpecTest.java | 132 byte[] exp = new byte[24]; in testGetKey() 133 System.arraycopy(key1, 2, exp, 0, 24); in testGetKey() 135 + "in constructor.", Arrays.equals(exp, res)); in testGetKey()
|
D | DESKeySpecTest.java | 187 byte[] exp = new byte[8]; in testGetKey() 188 System.arraycopy(key1, 2, exp, 0, 8); in testGetKey() 190 + "in constructor.", Arrays.equals(exp, res)); in testGetKey()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_TestWebServer.java | 769 long exp; in printHeaders() local 770 exp = Support_TestWebData.testParams[testNum].testExp; in printHeaders() 772 + df.format(exp) + " GMT"); in printHeaders() 791 long exp; in printHeaders() local 792 exp = Support_TestWebData.testParams[testNum].testExp; in printHeaders() 794 + df.format(exp) + " GMT"); in printHeaders()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | ProxyTest.java | 270 for (Class<?> exp : exceptions) { in test_ProxyClass_withParentAndSubInThrowList() 271 exps.add(exp); in test_ProxyClass_withParentAndSubInThrowList()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidStrictMathTest.java | 181 .abs(StrictMath.exp(4D) - StrictMath.E * StrictMath.E in testExpD() 184 .log(StrictMath.abs(StrictMath.exp(5.5D)) - 5.5D) < 10.0D); in testExpD() 275 double answer = StrictMath.log(StrictMath.exp(d)); in testLogD()
|
D | OldAndroidMathTest.java | 188 .exp(4D) in testExpD() 191 .abs(Math.exp(5.5D)) - 5.5D) < 10.0D); in testExpD() 276 double answer = Math.log(Math.exp(d)); in testLogD()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StrictMathBenchmark.java | 119 StrictMath.exp(d); in timeExp()
|
D | MathBenchmark.java | 169 result = Math.exp(d); in timeExp()
|
/libcore/luni/src/main/java/java/lang/ |
D | StrictMath.java | 281 public static native double exp(double d); in exp() method in StrictMath
|
D | Math.java | 277 public static native double exp(double d); in exp() method in Math
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalArithmeticTest.java | 114 int exp = 10; in testPowMathContext() local 119 BigDecimal result = aNumber.pow(exp, mc); in testPowMathContext()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StrictMathTest.java | 357 .abs(StrictMath.exp(4D) - StrictMath.E * StrictMath.E in test_expD() 360 .log(StrictMath.abs(StrictMath.exp(5.5D)) - 5.5D) < 10.0D); in test_expD() 507 double answer = StrictMath.log(StrictMath.exp(d)); in test_logD()
|
D | MathTest.java | 339 .exp(4D) in test_expD() 342 .abs(Math.exp(5.5D)) - 5.5D) < 10.0D); in test_expD() 548 double answer = Math.log(Math.exp(d)); in test_logD()
|