Home
last modified time | relevance | path

Searched refs:exponent (Results 1 – 17 of 17) sorted by relevance

/libcore/ojluni/src/main/java/sun/misc/
DFpUtils.java342 int exponent = getExponent(d); in ilogb() local
344 switch (exponent) { in ilogb()
377 exponent--; in ilogb()
379 exponent++; in ilogb()
380 assert( exponent >= in ilogb()
382 exponent < DoubleConsts.MIN_EXPONENT); in ilogb()
383 return exponent; in ilogb()
387 assert( exponent >= DoubleConsts.MIN_EXPONENT && in ilogb()
388 exponent <= DoubleConsts.MAX_EXPONENT); in ilogb()
389 return exponent; in ilogb()
[all …]
/libcore/ojluni/src/test/java/math/BigInteger/
DLargeValueExceptions.java172 int exponent = 1 << shift; in powOverflow1() local
173 BigInteger x = ONE.shiftLeft((int)(MAX_BITS / exponent)); in powOverflow1()
174 BigInteger y = x.pow(exponent); in powOverflow1()
180 int exponent = 1 << shift; in powOverflow2() local
181 BigInteger x = ONE.shiftLeft((int)(MAX_BITS / exponent)).add(ONE); in powOverflow2()
182 BigInteger y = x.pow(exponent); in powOverflow2()
188 int exponent = 1 << shift; in powOverflow3() local
189 BigInteger x = ONE.shiftLeft((int)(MAX_BITS / exponent)).subtract(ONE); in powOverflow3()
190 BigInteger y = x.pow(exponent); in powOverflow3()
196 int exponent = 1 << shift; in powOverflow4() local
[all …]
DPrimitiveConversionTests.java52 for (int exponent : Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 31, 32, 33,
56 BigInteger x = ONE.shiftLeft(exponent);
/libcore/ojluni/src/test/java/lang/Math/
DTests.java88 int exponent = Math.getExponent(d); in ilogb() local
90 switch (exponent) { in ilogb()
124 exponent--; in ilogb()
126 exponent++; in ilogb()
127 Assert.assertTrue(exponent >= in ilogb()
129 exponent < Double.MIN_EXPONENT); in ilogb()
130 return exponent; in ilogb()
134 Assert.assertTrue(exponent >= Double.MIN_EXPONENT && in ilogb()
135 exponent <= Double.MAX_EXPONENT); in ilogb()
136 return exponent; in ilogb()
[all …]
/libcore/ojluni/src/main/java/jdk/internal/math/
DFormattedFloatingDecimal.java43 private char[] exponent; field in FormattedFloatingDecimal
60 this.exponent = null; in FormattedFloatingDecimal()
132 return exponent; in getExponent()
250 exponent = create(isNegExp,1); in fillCompatible()
251 exponent[expStartIntex] = (char) (e + '0'); in fillCompatible()
253 exponent = create(isNegExp,2); in fillCompatible()
254 exponent[expStartIntex] = (char) (e / 10 + '0'); in fillCompatible()
255 exponent[expStartIntex+1] = (char) (e % 10 + '0'); in fillCompatible()
257 exponent = create(isNegExp,3); in fillCompatible()
258 exponent[expStartIntex] = (char) (e / 100 + '0'); in fillCompatible()
[all …]
DFloatingDecimal.java823 … int exponent = (int)((dBits & DoubleConsts.EXP_BIT_MASK) >> EXP_SHIFT) - DoubleConsts.EXP_BIAS;
825 if(exponent>=0 && exponent<52) { // hot path
826 long mask = DoubleConsts.SIGNIF_BIT_MASK >> exponent;
827 … int r = (int)(( (dBits&DoubleConsts.SIGNIF_BIT_MASK) | FRACT_HOB )>>(EXP_SHIFT-exponent));
829 } else if (exponent < 0) {
2241 long exponent = rawExponent + exponentAdjust; in parseHexString() local
2275 exponent += 1; in parseHexString()
2279 exponent += 2; in parseHexString()
2283 exponent += 3; in parseHexString()
2380 if (exponent >= Float.MIN_EXPONENT) { in parseHexString()
[all …]
/libcore/ojluni/src/test/java/math/BigDecimal/
DPowTests.java64 int exponent = testCase[1].intValueExact(); in zeroAndOneTests() local
68 result = testCase[0].pow(exponent); in zeroAndOneTests()
71 " to the " + exponent + " power; expected " + in zeroAndOneTests()
76 " to the " + exponent + " power."); in zeroAndOneTests()
/libcore/benchmarks/src/benchmarks/
DBigIntegerBenchmark.java168 BigInteger exponent = BigInteger.TEN.pow(len / 2 - 1); in repeatModPow() local
173 BigInteger newRes = base.modPow(exponent, product); in repeatModPow()
180 if (!lastRes.mod(odd1).equals(base.modPow(exponent, odd1))) { in repeatModPow()
183 + "base.modPow(exponent, odd1)=" + base.modPow(exponent, odd1) + " base=" in repeatModPow()
184 + base + " exponent=" + exponent); in repeatModPow()
186 if (!lastRes.mod(odd2).equals(base.modPow(exponent, odd2))) { in repeatModPow()
/libcore/ojluni/src/test/java/lang/Double/
DToHexStringTest.java90 int exponent = Integer.parseInt(transString.substring(0,3), 16) - in hexLongStringtoHexDoubleString() local
94 if (exponent == Double.MIN_EXPONENT - 1) { // zero or subnormal in hexLongStringtoHexDoubleString()
105 "p" + exponent); in hexLongStringtoHexDoubleString()
DParseHexFloatingPointTest.java180 long exponent = bigExponents[i]; in testDouble() local
181 testCase("0x10000.0p"+Long.toString(exponent) , in testDouble()
182 (exponent <0?0.0:infinityD)); in testDouble()
/libcore/ojluni/src/main/java/java/math/
DBigInteger.java2533 public BigInteger pow(int exponent) { in pow() argument
2534 if (exponent < 0) { in pow()
2538 return (exponent == 0 ? ONE : this); in pow()
2548 long bitsToShiftLong = (long)powersOfTwo * exponent; in pow()
2561 if (signum < 0 && (exponent&1) == 1) { in pow()
2570 if (signum < 0 && (exponent&1) == 1) { in pow()
2581 long scaleFactor = (long)remainingBits * exponent; in pow()
2587 int newSign = (signum <0 && (exponent&1) == 1 ? -1 : 1); in pow()
2591 int workingExponent = exponent; in pow()
2615 if ((long)bitLength() * exponent / Integer.SIZE > MAX_MAG_LENGTH) { in pow()
[all …]
DBigDecimal.java999 int exponent = (int) ((valBits >> 52) & 0x7ffL); in BigDecimal() local
1000 long significand = (exponent == 0 in BigDecimal()
1003 exponent -= 1075; in BigDecimal()
1020 exponent++; in BigDecimal()
1026 if (exponent == 0) { in BigDecimal()
1029 if (exponent < 0) { in BigDecimal()
1030 rb = BigInteger.valueOf(5).pow(-exponent).multiply(compactVal); in BigDecimal()
1031 scl = -exponent; in BigDecimal()
1033 rb = BigInteger.TWO.pow(exponent).multiply(compactVal); in BigDecimal()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java496 int exponent = Math.getExponent(a); in floorOrCeil() local
498 if (exponent < 0) { in floorOrCeil()
506 } else if (exponent >= 52) { in floorOrCeil()
514 assert exponent >= 0 && exponent <= 51; in floorOrCeil() local
517 long mask = DoubleConsts.SIGNIF_BIT_MASK >> exponent; in floorOrCeil()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DFormattedFloatingDecimal.java86 private char[] exponent; field in FormattedFloatingDecimal
/libcore/ojluni/annotations/sdk/nullability/java/math/
DBigInteger.annotated.java75 … @libcore.util.NonNull public BigInteger pow(int exponent) { throw new RuntimeException("Stub!"); } in pow() argument
91 …@libcore.util.NonNull public BigInteger modPow(@libcore.util.NonNull BigInteger exponent, @libcore… in modPow() argument
/libcore/ojluni/src/main/java/java/util/
DScanner.java488 String exponent = "([eE][+-]?"+digit+"+)?"; in buildFloatAndDecimalPattern() local
499 positiveSuffix + exponent + ")"; in buildFloatAndDecimalPattern()
501 negativeSuffix + exponent + ")"; in buildFloatAndDecimalPattern()
502 String decimal = "(([-+]?" + decimalNumeral + exponent + ")|"+ in buildFloatAndDecimalPattern()
DFormatter.java3789 int exponent = Math.getExponent(d);
3791 = (exponent == Double.MIN_EXPONENT - 1);
3800 exponent = Math.getExponent(d);
3801 assert exponent >= Double.MIN_EXPONENT &&
3802 exponent <= Double.MAX_EXPONENT: exponent;
3926 StringBuilder exp = bdl.exponent(); in print()
4045 public StringBuilder exponent() { in exponent() method in Formatter.FormatSpecifier.BigDecimalLayout