Lines Matching defs:length
118 Vector(T* data, int length) : start_(data), length_(length) {
119 ASSERT(length == 0 || (length > 0 && data != NULL));
128 int length() const { return length_; }
609 int length = value.length();
612 while (length >= kMaxUint64DecimalDigits) {
615 length -= kMaxUint64DecimalDigits;
619 uint64_t digits = ReadUInt64(value, pos, length);
620 MultiplyByPowerOfTen(length);
636 int length = value.length();
638 int needed_bigits = length * 4 / kBigitSize + 1;
640 int string_index = length - 1;
1393 Vector<char> buffer, int* length);
1397 Vector<char>(buffer), int* length);
1401 Vector<char>(buffer), int* length);
1405 Vector<char> buffer, int* length, int* decimal_point) {
1426 *length = 0;
1450 is_even, buffer, length);
1455 buffer, length);
1460 buffer, length);
1465 buffer[*length] = '\0';
1471 Vector<char> buffer, int* length) {
1475 *length = 0;
1481 buffer[(*length)++] = static_cast<char>(digit + '0');
1511 ASSERT(buffer[(*length) - 1] != '9');
1512 buffer[(*length) - 1]++;
1514 if ((buffer[(*length) - 1] - '0') % 2 == 0) {
1517 ASSERT(buffer[(*length) - 1] != '9');
1518 buffer[(*length) - 1]++;
1526 ASSERT(buffer[(*length) -1] != '9');
1527 buffer[(*length) - 1]++;
1535 Vector<char> buffer, int* length) {
1563 *length = count;
1568 Vector<char>(buffer), int* length)
1572 *length = 0;
1580 *length = 1;
1583 *length = 0;
1590 buffer, length);
1734 int* length,
1740 static bool RoundWeed(Vector<char> buffer, int length,
1752 buffer[length - 1]--;
1766 static bool RoundWeedCounted(Vector<char> buffer, int length,
1779 buffer[length - 1]++;
1780 for (int i = length - 1; i > 0; --i) {
1815 int* length, int* kappa)
1834 *length = 0;
1839 buffer[*length] = static_cast<char>('0' + digit);
1840 (*length)++;
1848 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f(),
1866 buffer[*length] = static_cast<char>('0' + digit);
1867 (*length)++;
1871 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit,
1878 int* length, int* kappa)
1893 *length = 0;
1898 buffer[*length] = static_cast<char>('0' + digit);
1899 (*length)++;
1910 return RoundWeedCounted(buffer, *length, rest,
1925 buffer[*length] = static_cast<char>('0' + digit);
1926 (*length)++;
1932 return RoundWeedCounted(buffer, *length, fractionals, one.f(), w_error,
1937 int* length, int* decimal_exponent)
1971 buffer, length, &kappa);
1977 int* length, int* decimal_exponent)
1999 buffer, length, &kappa);
2009 int* length,
2018 result = Grisu3(v, mode, buffer, length, &decimal_exponent);
2022 buffer, length, &decimal_exponent);
2028 *decimal_point = *length + decimal_exponent;
2029 buffer[*length] = '\0';
2120 Vector<char> buffer, int* length) {
2122 buffer[(*length) + i] = '0' + number % 10;
2125 *length += requested_length;
2129 static void FillDigits32(uint32_t number, Vector<char> buffer, int* length) {
2135 buffer[(*length) + number_length] = static_cast<char>('0' + digit);
2139 int i = *length;
2140 int j = *length + number_length - 1;
2148 *length += number_length;
2153 Vector<char> buffer, int* length) {
2161 FillDigits32FixedLength(part0, 3, buffer, length);
2162 FillDigits32FixedLength(part1, 7, buffer, length);
2163 FillDigits32FixedLength(part2, 7, buffer, length);
2167 static void FillDigits64(uint64_t number, Vector<char> buffer, int* length) {
2176 FillDigits32(part0, buffer, length);
2177 FillDigits32FixedLength(part1, 7, buffer, length);
2178 FillDigits32FixedLength(part2, 7, buffer, length);
2180 FillDigits32(part1, buffer, length);
2181 FillDigits32FixedLength(part2, 7, buffer, length);
2183 FillDigits32(part2, buffer, length);
2188 static void RoundUp(Vector<char> buffer, int* length, int* decimal_point) {
2190 if (*length == 0) {
2193 *length = 1;
2197 buffer[(*length) - 1]++;
2198 for (int i = (*length) - 1; i > 0; --i) {
2214 int* length, int* decimal_point)
2227 buffer[*length] = static_cast<char>('0' + digit);
2228 (*length)++;
2233 RoundUp(buffer, length, decimal_point);
2246 buffer[*length] = static_cast<char>('0' + digit);
2247 (*length)++;
2250 RoundUp(buffer, length, decimal_point);
2258 static void TrimZeros(Vector<char> buffer, int* length, int* decimal_point) {
2259 while (*length > 0 && buffer[(*length) - 1] == '0') {
2260 (*length)--;
2263 while (first_non_zero < *length && buffer[first_non_zero] == '0') {
2267 for (int i = first_non_zero; i < *length; ++i) {
2270 *length -= first_non_zero;
2279 int* length,
2287 *length = 0;
2306 FillDigits32(quotient, buffer, length);
2307 FillDigits64FixedLength(remainder, buffer, length);
2308 *decimal_point = *length;
2312 FillDigits64(significand, buffer, length);
2313 *decimal_point = *length;
2318 FillDigits64(integrals, buffer, length);
2320 FillDigits32(static_cast<uint32_t>(integrals), buffer, length);
2322 *decimal_point = *length;
2324 buffer, length, decimal_point);
2330 *length = 0;
2335 buffer, length, decimal_point);
2337 TrimZeros(buffer, length, decimal_point);
2338 buffer[*length] = '\0';
2339 if ((*length) == 0) {
2355 for (int i = 0; i < buffer.length(); i++) {
2357 return buffer.SubVector(i, buffer.length());
2365 for (int i = buffer.length() - 1; i >= 0; --i) {
2382 ASSERT(buffer[buffer.length() - 1] != '0');
2386 exponent + (buffer.length() - kMaxSignificantDecimalDigits);
2394 exponent += left_trimmed.length() - right_trimmed.length();
2395 if (right_trimmed.length() > kMaxSignificantDecimalDigits) {
2412 while (i < buffer.length() && result <= (kMaxUint64 / 10 - 1)) {
2426 if (buffer.length() == read_digits) {
2437 *remaining_decimals = buffer.length() - read_digits;
2492 if (kMaxUint64DecimalDigits - buffer.length() >= adjustment_exponent) {
2552 ASSERT(buffer.length() + exponent <= kMaxDecimalPower + 1);
2553 ASSERT(buffer.length() + exponent > kMinDecimalPower);
2554 ASSERT(buffer.length() <= kMaxSignificantDecimalDigits);
2577 if (trimmed.length() == 0) {
2581 if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
2585 if (exponent + trimmed.length() <= kMinDecimalPower) {
2690 // The result should be interpreted as buffer * 10^(point-length).
2697 int* length,
2709 int length,
2714 int length,
2757 int length,
2768 int length,
2797 int length,
2800 ASSERT(length != 0);
2802 if (length != 1) {
2804 result.append(&decimal_digits[1], length-1);
2835 int length,
2846 ASSERT(length <= digits_after_point - (-decimal_point));
2847 result.append(decimal_digits, length);
2848 int remaining_digits = digits_after_point - (-decimal_point) - length;
2851 } else if (decimal_point >= length) {
2853 result.append(decimal_digits, length);
2854 result.append(decimal_point - length, '0');
2864 ASSERT(length - decimal_point <= digits_after_point);
2865 result.append(&decimal_digits[decimal_point], length - decimal_point);
2866 int remaining_digits = digits_after_point - (length - decimal_point);
3069 bool* sign, int* length, int* point)
3084 *length = 0;
3091 *length = 1;
3099 fast_worked = FastDtoa(v, FAST_DTOA_SHORTEST, 0, vector, length, point);
3102 fast_worked = FastFixedDtoa(v, requested_digits, vector, length, point);
3106 vector, length, point);
3116 BignumDtoa(v, bignum_mode, requested_digits, vector, length, point);
3117 vector[*length] = '\0';
3283 int length,
3286 const char *end = input + length;
3578 int length,
3580 return StringToIeee(buffer, length, processed_characters_count);
3589 int length, point;
3592 0, buf, 20, &sign, &length, &point);
3594 int exponent = point - length;
3606 } else if (point >= 0 && point <= length) {
3610 ret.append(&buf[point], length - point);
3665 return conv.StringToDouble(s.c_str(), s.length(), &dummy);