Home | History | Annotate | Download | only in src

Lines Matching refs:radix

123 static bool isDigit(int x, int radix) {
124 return (x >= '0' && x <= '9' && x < '0' + radix)
125 || (radix > 10 && x >= 'a' && x < 'a' + radix - 10)
126 || (radix > 10 && x >= 'A' && x < 'A' + radix - 10);
135 // Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end.
152 const int radix = (1 << radix_log_2);
156 if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
158 } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) {
160 } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) {
171 number = number * radix + digit;
190 if (current == end || !isDigit(*current, radix)) break;
243 int radix) {
268 if (radix == 0) {
269 // Radix detection.
274 radix = 16;
278 radix = 8;
282 radix = 10;
284 } else if (radix == 16) {
298 if (radix < 2 || radix > 36) return JUNK_STRING_VALUE;
307 if (!leading_zero && !isDigit(*current, radix)) {
311 if (IsPowerOf2(radix)) {
312 switch (radix) {
335 if (radix == 10) {
370 int lim_0 = '0' + (radix < 10 ? radix : 10);
371 int lim_a = 'a' + (radix - 10);
372 int lim_A = 'A' + (radix - 10);
403 uint32_t m = multiplier * radix;
405 part = part * radix + d;
700 int radix) {
705 return InternalStringToInt(unicode_cache, begin, end, radix);
709 return InternalStringToInt(unicode_cache, begin, end, radix);
715 radix);
1032 char* DoubleToRadixCString(double value, int radix) {
1033 ASSERT(radix >= 2 && radix <= 36);
1039 // for max integer value in radix 2. We need room for a sign too.
1062 chars[static_cast<int>(modulo(integer_part, radix))];
1063 integer_part /= radix;
1070 // Convert the decimal part. Repeatedly multiply by the radix to
1081 decimal_part *= radix;