Home
last modified time | relevance | path

Searched refs:exp (Results 1 – 25 of 25) sorted by relevance

/libcore/luni/src/main/java/java/math/
DMultiplication.java104 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 …]
DBigInteger.java903 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()
DBigDecimal.java1440 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()
DBigInt.java290 static BigInt exp(BigInt a, int p) { in exp() method in BigInt
/libcore/luni/src/test/resources/
Dmath_tests.csv4538 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 …]
Dmath_important_numbers.csv256 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/
DNetFd.h58 #define NET_FAILURE_RETRY(fd, exp) ({ \ argument
59 typeof (exp) _rc; \
61 _rc = (exp); \
Djava_lang_Math.cpp51 return exp(a); in Math_exp()
132 NATIVE_METHOD(Math, exp, "!(D)D"),
Djava_lang_StrictMath.cpp131 NATIVE_METHOD(StrictMath, exp, "!(D)D"),
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerModPowTest.java42 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 …]
DBigIntegerMultiplyTest.java282 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 …]
DBigDecimalArithmeticTest.java423 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/
DDESedeKeySpecTest.java132 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()
DDESKeySpecTest.java187 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/
DSupport_TestWebServer.java769 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/
DProxyTest.java270 for (Class<?> exp : exceptions) { in test_ProxyClass_withParentAndSubInThrowList()
271 exps.add(exp); in test_ProxyClass_withParentAndSubInThrowList()
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidStrictMathTest.java181 .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()
DOldAndroidMathTest.java188 .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/
DStrictMathBenchmark.java119 StrictMath.exp(d); in timeExp()
DMathBenchmark.java169 result = Math.exp(d); in timeExp()
/libcore/luni/src/main/java/java/lang/
DStrictMath.java281 public static native double exp(double d); in exp() method in StrictMath
DMath.java277 public static native double exp(double d); in exp() method in Math
/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalArithmeticTest.java114 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/
DStrictMathTest.java357 .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()
DMathTest.java339 .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()