Home
last modified time | relevance | path

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

123456

/external/icu/icu4c/source/data/misc/
DnumberingSystems.txt14 radix:int{10}
19 radix:int{10}
24 radix:int{10}
29 radix:int{10}
34 radix:int{10}
39 radix:int{10}
44 radix:int{10}
49 radix:int{10}
54 radix:int{10}
59 radix:int{10}
[all …]
/external/v8/test/mjsunit/regress/
Dregress-1246.js53 var radix = radix_detect[i]; variable
54 assertEquals(NaN, parseInt("", radix));
55 assertEquals(23, parseInt("23", radix));
56 assertEquals(0xaf, parseInt("0xaf", radix));
57 assertEquals(NaN, parseInt("af", radix));
61 var radix = radix_invalid[i];
62 assertEquals(NaN, parseInt("", radix));
63 assertEquals(NaN, parseInt("23", radix));
64 assertEquals(NaN, parseInt("0xaf", radix));
65 assertEquals(NaN, parseInt("af", radix));
[all …]
Dregress-parseint.js7 function f(string, radix) { argument
9 radix = (radix == 0) ? radix : (radix >> 0);
10 if (radix != 2) return NaN;
11 return %StringParseInt(string, radix);
/external/guava/guava/src/com/google/common/primitives/
DUnsignedLongs.java273 return parseUnsignedLong(request.rawValue, request.radix); in decode()
293 public static long parseUnsignedLong(String s, int radix) { in parseUnsignedLong() argument
298 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) { in parseUnsignedLong()
299 throw new NumberFormatException("illegal radix: " + radix); in parseUnsignedLong()
302 int max_safe_pos = maxSafeDigits[radix] - 1; in parseUnsignedLong()
305 int digit = Character.digit(s.charAt(pos), radix); in parseUnsignedLong()
309 if (pos > max_safe_pos && overflowInParse(value, digit, radix)) { in parseUnsignedLong()
312 value = (value * radix) + digit; in parseUnsignedLong()
324 private static boolean overflowInParse(long current, int digit, int radix) { in overflowInParse() argument
326 if (current < maxValueDivs[radix]) { in overflowInParse()
[all …]
DParseRequest.java25 final int radix; field in ParseRequest
27 private ParseRequest(String rawValue, int radix) { in ParseRequest() argument
29 this.radix = radix; in ParseRequest()
39 int radix; in fromString() local
43 radix = 16; in fromString()
46 radix = 16; in fromString()
49 radix = 8; in fromString()
52 radix = 10; in fromString()
55 return new ParseRequest(rawValue, radix); in fromString()
DUnsignedBytes.java187 public static String toString(byte x, int radix) { in toString() argument
188 checkArgument(radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX, in toString()
189 "radix (%s) must be between Character.MIN_RADIX and Character.MAX_RADIX", radix); in toString()
191 return Integer.toString(toInt(x), radix); in toString()
221 public static byte parseUnsignedByte(String string, int radix) { in parseUnsignedByte() argument
222 int parse = Integer.parseInt(checkNotNull(string), radix); in parseUnsignedByte()
DUnsignedInts.java215 return parseUnsignedInt(request.rawValue, request.radix); in decode()
246 public static int parseUnsignedInt(String string, int radix) { in parseUnsignedInt() argument
248 long result = Long.parseLong(string, radix); in parseUnsignedInt()
250 throw new NumberFormatException("Input " + string + " in base " + radix in parseUnsignedInt()
272 public static String toString(int x, int radix) { in toString() argument
274 return Long.toString(asLong, radix); in toString()
/external/smali/smali/src/main/java/org/jf/smali/
DLiteralTools.java53 int radix = 10; in parseByte() local
65 radix = 16; in parseByte()
68 radix = 8; in parseByte()
75 byte maxValue = (byte)(Byte.MAX_VALUE / (radix / 2)); in parseByte()
78 digit = Character.digit(byteChars[position], radix); in parseByte()
82 shiftedResult = (byte)(result * radix); in parseByte()
123 int radix = 10; in parseShort() local
135 radix = 16; in parseShort()
138 radix = 8; in parseShort()
145 short maxValue = (short)(Short.MAX_VALUE / (radix / 2)); in parseShort()
[all …]
/external/guava/guava-tests/test/com/google/common/primitives/
DUnsignedBytesTest.java155 private static void assertParseFails(String value, int radix) { in assertParseFails() argument
157 UnsignedBytes.parseUnsignedByte(value, radix); in assertParseFails()
165 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseUnsignedByteWithRadix()
167 assertEquals((byte) i, UnsignedBytes.parseUnsignedByte(Integer.toString(i, radix), radix)); in testParseUnsignedByteWithRadix() local
169 assertParseFails(Integer.toString(1000, radix), radix); in testParseUnsignedByteWithRadix()
170 assertParseFails(Integer.toString(-1, radix), radix); in testParseUnsignedByteWithRadix()
171 assertParseFails(Integer.toString(-128, radix), radix); in testParseUnsignedByteWithRadix()
172 assertParseFails(Integer.toString(256, radix), radix); in testParseUnsignedByteWithRadix()
211 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testToStringWithRadix()
213 assertEquals(Integer.toString(i, radix), UnsignedBytes.toString((byte) i, radix)); in testToStringWithRadix() local
DUnsignedIntsTest.java176 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseIntWithRadix()
177 assertEquals((int) a, UnsignedInts.parseUnsignedInt(Long.toString(a, radix), radix)); in testParseIntWithRadix() local
182 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseIntWithRadix()
184 String maxAsString = Long.toString((1L << 32) - 1, radix); in testParseIntWithRadix()
185 assertEquals(-1, UnsignedInts.parseUnsignedInt(maxAsString, radix)); in testParseIntWithRadix()
190 String overflowAsString = Long.toString(overflow, radix); in testParseIntWithRadix()
191 UnsignedInts.parseUnsignedInt(overflowAsString, radix); in testParseIntWithRadix()
/external/icu/icu4c/source/common/
Dcstring.c155 T_CString_integerToString(char* buffer, int32_t v, int32_t radix) in T_CString_integerToString() argument
163 U_ASSERT(radix>=2 && radix<=16); in T_CString_integerToString()
165 if(v<0 && radix == 10) { in T_CString_integerToString()
174 digit = (uint8_t)(uval % radix); in T_CString_integerToString()
176 uval = uval / radix; in T_CString_integerToString()
193 T_CString_int64ToString(char* buffer, int64_t v, uint32_t radix) in T_CString_int64ToString() argument
201 U_ASSERT(radix>=2 && radix<=16); in T_CString_int64ToString()
203 if(v<0 && radix == 10) { in T_CString_int64ToString()
212 digit = (uint8_t)(uval % radix); in T_CString_int64ToString()
214 uval = uval / radix; in T_CString_int64ToString()
[all …]
Dutil_props.cpp30 int8_t radix = 10; in parseInteger() local
35 radix = 16; in parseInteger()
40 radix = 8; in parseInteger()
45 int32_t d = u_digit(rule.charAt(p++), radix); in parseInteger()
51 int32_t v = (value * radix) + d; in parseInteger()
186 int32_t& pos, int8_t radix) { in parseNumber() argument
194 int32_t d = u_digit(ch, radix); in parseNumber()
198 n = radix*n + d; in parseNumber()
/external/v8/src/
Dconversions-inl.h145 const int radix = (1 << radix_log_2); in InternalStringToIntDouble() local
149 if (*current >= '0' && *current <= '9' && *current < '0' + radix) { in InternalStringToIntDouble()
151 } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) { in InternalStringToIntDouble()
153 } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) { in InternalStringToIntDouble()
164 number = number * radix + digit; in InternalStringToIntDouble()
183 if (current == end || !isDigit(*current, radix)) break; in InternalStringToIntDouble()
234 int radix) { in InternalStringToInt() argument
259 if (radix == 0) { in InternalStringToInt()
261 radix = 10; in InternalStringToInt()
266 radix = 16; in InternalStringToInt()
[all …]
Dconversions.h30 inline bool isDigit(int x, int radix) { in isDigit() argument
31 return (x >= '0' && x <= '9' && x < '0' + radix) in isDigit()
32 || (radix > 10 && x >= 'a' && x < 'a' + radix - 10) in isDigit()
33 || (radix > 10 && x >= 'A' && x < 'A' + radix - 10); in isDigit()
128 int radix);
133 int radix);
151 char* DoubleToRadixCString(double value, int radix);
/external/guava/guava-gwt/test-super/com/google/common/primitives/super/com/google/common/primitives/
DUnsignedIntsTest.java159 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseIntWithRadix()
160 assertEquals((int) a, UnsignedInts.parseUnsignedInt(Long.toString(a, radix), radix)); in testParseIntWithRadix() local
165 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseIntWithRadix()
167 String maxAsString = Long.toString((1L << 32) - 1, radix); in testParseIntWithRadix()
168 assertEquals(-1, UnsignedInts.parseUnsignedInt(maxAsString, radix)); in testParseIntWithRadix()
173 String overflowAsString = Long.toString(overflow, radix); in testParseIntWithRadix()
174 UnsignedInts.parseUnsignedInt(overflowAsString, radix); in testParseIntWithRadix()
/external/icu/icu4c/source/i18n/
Dnfrs.cpp822 int64_t util64_atoi(const char* str, uint32_t radix) in util64_atoi() argument
824 if (radix > 36) { in util64_atoi()
825 radix = 36; in util64_atoi()
826 } else if (radix < 2) { in util64_atoi()
827 radix = 2; in util64_atoi()
829 int64_t lradix = radix; in util64_atoi()
838 while ((b = digitInfo[*str++]) && ((b &= 0x7f) < radix)) { in util64_atoi()
848 int64_t util64_utoi(const UChar* str, uint32_t radix) in util64_utoi() argument
850 if (radix > 36) { in util64_utoi()
851 radix = 36; in util64_utoi()
[all …]
Dnfrs.h82 int64_t util64_pow(int32_t radix, uint32_t exponent);
85 uint32_t util64_tou(int64_t n, UChar* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = FAL…
88 int64_t util64_utoi(const UChar* str, uint32_t radix = 10);
89 uint32_t util64_toa(int64_t n, char* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = FALS…
90 int64_t util64_atoi(const char* str, uint32_t radix);
/external/elfutils/src/src/
Dsize.c130 } radix; variable
228 radix = radix_decimal; in parse_opt()
236 radix = radix_octal; in parse_opt()
240 radix = radix_hex; in parse_opt()
266 radix = radix_hex; in parse_opt()
268 radix = radix_decimal; in parse_opt()
270 radix = radix_octal; in parse_opt()
411 const int digits = length_map[gelf_getclass (elf) - 1][radix]; in show_sysv()
453 printf ((radix == radix_hex in show_sysv()
455 : (radix == radix_decimal in show_sysv()
[all …]
/external/vboot_reference/firmware/lib/
Dutility_string.c14 uint32_t radix, uint32_t zero_pad_width) in Uint64ToString() argument
27 if (radix < 2 || radix > 36 || zero_pad_width >= UINT64_TO_STRING_MAX) in Uint64ToString()
34 int v = value % radix; in Uint64ToString()
35 value /= radix; in Uint64ToString()
/external/icu/icu4j/main/classes/translit/src/com/ibm/icu/text/
DEscapeTransliterator.java53 private int radix; field in EscapeTransliterator
152 int radix, int minDigits, in EscapeTransliterator() argument
158 this.radix = radix; in EscapeTransliterator()
183 Utility.appendNumber(buf, c, supplementalHandler.radix, in handleTransliterate()
195 Utility.appendNumber(buf, c, radix, minDigits); in handleTransliterate()
220 for (int i = 0; i < it.radix; ++i) { in addSourceTargetSet()
221 Utility.appendNumber(buffer, i, it.radix, it.minDigits); in addSourceTargetSet()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNFRule.java58 private int radix = 10; field in NFRule
148 && rule1.baseValue % (Math.pow(rule1.radix, rule1.exponent)) == 0) in makeRules()
181 rule2.radix = rule1.radix; in makeRules()
315 radix = (int)tempValue; in parseRuleDescriptor()
316 if (radix == 0) { in parseRuleDescriptor()
497 radix = 10; in setBaseValue()
505 sub1.setDivisor(radix, exponent); in setBaseValue()
508 sub2.setDivisor(radix, exponent); in setBaseValue()
514 radix = 10; in setBaseValue()
528 if (radix == 0 || baseValue < 1) { in expectedExponent()
[all …]
/external/crcalc/src/com/hp/creals/
DStringFloatRep.java44 radix = r; in StringFloatRep()
59 public int radix; field in StringFloatRep
71 + (radix == 10? "" : "(radix " + radix + ")"); in toString()
/external/icu/icu4c/source/io/
Dufmt_cmn.c55 int32_t radix) in ufmt_isdigit() argument
59 return (UBool)(digitVal < radix && digitVal >= 0); in ufmt_isdigit()
69 uint8_t radix, in ufmt_64tou() argument
78 digit = (uint32_t)(value % radix); in ufmt_64tou()
79 value = value / radix; in ufmt_64tou()
137 int8_t radix) in ufmt_uto64() argument
150 while(ufmt_isdigit(*buffer, radix) && buffer < limit) { in ufmt_uto64()
153 result *= radix; in ufmt_uto64()
/external/v8/test/webkit/fast/js/
Dnumber-toString-expected.txt29 PASS (1234.567).toString(0) threw exception RangeError: toString() radix argument must be between 2…
30 PASS (1234.567).toString(null) threw exception RangeError: toString() radix argument must be betwee…
31 PASS (1234.567).toString(false) threw exception RangeError: toString() radix argument must be betwe…
32 PASS (1234.567).toString('foo') threw exception RangeError: toString() radix argument must be betwe…
33 PASS (1234.567).toString(nan) threw exception RangeError: toString() radix argument must be between…
34 PASS (1234.567).toString(1) threw exception RangeError: toString() radix argument must be between 2…
35 PASS (1234.567).toString(true) threw exception RangeError: toString() radix argument must be betwee…
36 PASS (1234.567).toString('1') threw exception RangeError: toString() radix argument must be between…
73 PASS (1234.567).toString(37) threw exception RangeError: toString() radix argument must be between …
74 PASS (1234.567).toString(-1) threw exception RangeError: toString() radix argument must be between …
[all …]
/external/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/
Dradix.pass.cpp21 static_assert(std::numeric_limits<T>::radix == expected, "radix test 1"); in test()
22 static_assert(std::numeric_limits<const T>::radix == expected, "radix test 2"); in test()
23 static_assert(std::numeric_limits<volatile T>::radix == expected, "radix test 3"); in test()
24 static_assert(std::numeric_limits<const volatile T>::radix == expected, "radix test 4"); in test()

123456