/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerToStringTest.java | 37 int radix = 10; in testRadixOutOfRange() local 38 BigInteger aNumber = new BigInteger(value, radix); in testRadixOutOfRange() 48 int radix = 2; in testRadix2Neg() local 49 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Neg() 50 String result = aNumber.toString(radix); in testRadix2Neg() 59 int radix = 2; in testRadix2Pos() local 60 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Pos() 61 String result = aNumber.toString(radix); in testRadix2Pos() 70 int radix = 16; in testRadix10Neg() local 71 BigInteger aNumber = new BigInteger(value, radix); in testRadix10Neg() [all …]
|
D | BigIntegerConstructorsTest.java | 576 int radix = 45; in testConstructorStringException1() local 578 new BigInteger(value, radix); in testConstructorStringException1() 590 int radix = 10; in testConstructorStringException2() local 592 new BigInteger(value, radix); in testConstructorStringException2() 604 int radix = 34; in testConstructorStringException3() local 606 new BigInteger(value, radix); in testConstructorStringException3() 618 int radix = 20; in testConstructorStringException4() local 620 new BigInteger(value, radix); in testConstructorStringException4() 631 int radix = 2; in testConstructorStringRadix2() local 633 BigInteger aNumber = new BigInteger(value, radix); in testConstructorStringRadix2() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Long.java | 121 public static String toString(long i, int radix) { in toString() argument 122 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in toString() 123 radix = 10; in toString() 124 if (radix == 10) in toString() 134 while (i <= -radix) { in toString() 135 buf[charPos--] = Integer.digits[(int)(-(i % radix))]; in toString() 136 i = i / radix; in toString() 173 public static String toUnsignedString(long i, int radix) { in toUnsignedString() argument 175 return toString(i, radix); in toUnsignedString() 177 switch (radix) { in toUnsignedString() [all …]
|
D | Integer.java | 131 public static String toString(int i, int radix) { in toString() argument 132 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in toString() 133 radix = 10; in toString() 136 if (radix == 10) { in toString() 148 while (i <= -radix) { in toString() 149 buf[charPos--] = digits[-(i % radix)]; in toString() 150 i = i / radix; in toString() 187 public static String toUnsignedString(int i, int radix) { in toUnsignedString() argument 188 return Long.toUnsignedString(toUnsignedLong(i), radix); in toUnsignedString() 333 int radix = 1 << shift; in formatUnsignedInt() local [all …]
|
D | Short.java | 117 public static short parseShort(String s, int radix) in parseShort() argument 119 int i = Integer.parseInt(s, radix); in parseShort() 122 "Value out of range. Value:\"" + s + "\" Radix:" + radix); in parseShort() 173 public static Short valueOf(String s, int radix) in valueOf() argument 175 return valueOf(parseShort(s, radix)); in valueOf()
|
D | Byte.java | 147 public static byte parseByte(String s, int radix) in parseByte() argument 149 int i = Integer.parseInt(s, radix); in parseByte() 152 "Value out of range. Value:\"" + s + "\" Radix:" + radix); in parseByte() 203 public static Byte valueOf(String s, int radix) in valueOf() argument 205 return valueOf(parseByte(s, radix)); in valueOf()
|
D | Character.java | 6613 public static int digit(char ch, int radix) { in digit() argument 6614 return digit((int)ch, radix); in digit() 6665 public static int digit(int codePoint, int radix) { in digit() argument 6666 if (radix < MIN_RADIX || radix > MAX_RADIX) { in digit() 6679 return result < radix ? result : -1; in digit() 6681 return digitImpl(codePoint, radix); in digit() 6685 native static int digitImpl(int codePoint, int radix); in digitImpl() argument 7153 public static char forDigit(int digit, int radix) { in forDigit() argument 7154 if ((digit >= radix) || (digit < 0)) { in forDigit() 7157 if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) { in forDigit()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Scanner.java | 356 private int radix = 10; field in Scanner 424 String radixDigits = digits.substring(0, radix); in buildIntegerPatternString() 426 … String nonZeroRadixDigits = "((?i)[" + digits.substring(1, radix) + "]|(" + non0Digit + "))"; in buildIntegerPatternString() 1240 public int radix() { in radix() method in Scanner 1262 public Scanner useRadix(int radix) { in useRadix() argument 1263 if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) in useRadix() 1264 throw new IllegalArgumentException("radix:"+radix); in useRadix() 1266 if (this.defaultRadix == radix) in useRadix() 1268 this.defaultRadix = radix; in useRadix() 1276 private void setRadix(int radix) { in setRadix() argument [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | IntegerTest.java | 206 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { 208 Integer.parseUnsignedInt(Integer.toUnsignedString(val, radix), radix)); 254 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { 255 assertTrue(Integer.toUnsignedString(val, radix) 256 .equals(Long.toString(Integer.toUnsignedLong(val), radix)));
|
D | LongTest.java | 222 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { 224 Long.parseUnsignedLong(Long.toUnsignedString(val, radix), radix)); 261 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { 266 assertTrue(Long.toUnsignedString(val, radix).equals(b.toString(radix)));
|
/libcore/luni/src/main/java/java/math/ |
D | Conversion.java | 53 static String bigInteger2String(BigInteger val, int radix) { in bigInteger2String() argument 68 return Long.toString(v, radix); in bigInteger2String() 70 if ((radix == 10) || (radix < Character.MIN_RADIX) in bigInteger2String() 71 || (radix > Character.MAX_RADIX)) { in bigInteger2String() 75 bitsForRadixDigit = Math.log(radix) / Math.log(2); in bigInteger2String() 82 if (radix != 16) { in bigInteger2String() 86 int charsPerInt = digitFitInInt[radix]; in bigInteger2String() 89 int bigRadix = bigRadices[radix - 2]; in bigInteger2String() 98 resDigit % radix, radix); in bigInteger2String() 99 } while (((resDigit /= radix) != 0) && (currentChar != 0)); in bigInteger2String()
|
D | BigInteger.java | 234 public BigInteger(String value, int radix) { in BigInteger() argument 238 if (radix == 10) { in BigInteger() 242 } else if (radix == 16) { in BigInteger() 247 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) { in BigInteger() 248 throw new NumberFormatException("Invalid radix: " + radix); in BigInteger() 253 BigInteger.parseFromString(this, value, radix); in BigInteger() 868 public String toString(int radix) { in toString() argument 869 if (radix == 10) { in toString() 873 return Conversion.bigInteger2String(this, radix); in toString() 1158 private static void parseFromString(BigInteger bi, String value, int radix) { in parseFromString() argument [all …]
|
/libcore/ojluni/src/main/native/ |
D | Character.cpp | 101 Character_digitImpl(JNIEnv* env, jclass, jint codePoint, jint radix) { in Character_digitImpl() argument 102 return u_digit(codePoint, radix); in Character_digitImpl()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ScannerTest.java | 592 assertEquals(10, s.radix()); in test_radix() 611 assertEquals(11, s.radix()); in test_useRadix_I()
|