Debian Codegraph @

mfbt/double-conversion/double-conversion/double-to-string.h

raw
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are
4 // met:
5 //
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 #ifndef DOUBLE_CONVERSION_DOUBLE_TO_STRING_H_
29 #define DOUBLE_CONVERSION_DOUBLE_TO_STRING_H_
30
31 #include "mozilla/Types.h"
32 #include "utils.h"
33
34 namespace double_conversion {
35
36 class DoubleToStringConverter {
37 public:
38 // When calling ToFixed with a double > 10^kMaxFixedDigitsBeforePoint
39 // or a requested_digits parameter > kMaxFixedDigitsAfterPoint then the
40 // function returns false.
41 static const int kMaxFixedDigitsBeforePoint = 308;
42 static const int kMaxFixedDigitsAfterPoint = 100;
43
44 // When calling ToExponential with a requested_digits
45 // parameter > kMaxExponentialDigits then the function returns false.
46 static const int kMaxExponentialDigits = 120;
47
48 // When calling ToPrecision with a requested_digits
49 // parameter < kMinPrecisionDigits or requested_digits > kMaxPrecisionDigits
50 // then the function returns false.
51 static const int kMinPrecisionDigits = 1;
52 static const int kMaxPrecisionDigits = 120;
53
54 // The maximal number of digits that are needed to emit a double in base 10.
55 // A higher precision can be achieved by using more digits, but the shortest
56 // accurate representation of any double will never use more digits than
57 // kBase10MaximalLength.
58 // Note that DoubleToAscii null-terminates its input. So the given buffer
59 // should be at least kBase10MaximalLength + 1 characters long.
60 static const int kBase10MaximalLength = 17;
61
62 // The maximal number of digits that are needed to emit a single in base 10.
63 // A higher precision can be achieved by using more digits, but the shortest
64 // accurate representation of any single will never use more digits than
65 // kBase10MaximalLengthSingle.
66 static const int kBase10MaximalLengthSingle = 9;
67
68 // The length of the longest string that 'ToShortest' can produce when the
69 // converter is instantiated with EcmaScript defaults (see
70 // 'EcmaScriptConverter')
71 // This value does not include the trailing '\0' character.
72 // This amount of characters is needed for negative values that hit the
73 // 'decimal_in_shortest_low' limit. For example: "-0.0000033333333333333333"
74 static const int kMaxCharsEcmaScriptShortest = 25;
75
76 enum Flags {
77 NO_FLAGS = 0,
78 EMIT_POSITIVE_EXPONENT_SIGN = 1,
79 EMIT_TRAILING_DECIMAL_POINT = 2,
80 EMIT_TRAILING_ZERO_AFTER_POINT = 4,
81 UNIQUE_ZERO = 8,
82 NO_TRAILING_ZERO = 16,
83 EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL = 32,
84 EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL = 64
85 };
86
87 // Flags should be a bit-or combination of the possible Flags-enum.
88 // - NO_FLAGS: no special flags.
89 // - EMIT_POSITIVE_EXPONENT_SIGN: when the number is converted into exponent
90 // form, emits a '+' for positive exponents. Example: 1.2e+2.
91 // - EMIT_TRAILING_DECIMAL_POINT: when the input number is an integer and is
92 // converted into decimal format then a trailing decimal point is appended.
93 // Example: 2345.0 is converted to "2345.".
94 // - EMIT_TRAILING_ZERO_AFTER_POINT: in addition to a trailing decimal point
95 // emits a trailing '0'-character. This flag requires the
96 // EMIT_TRAILING_DECIMAL_POINT flag.
97 // Example: 2345.0 is converted to "2345.0".
98 // - UNIQUE_ZERO: "-0.0" is converted to "0.0".
99 // - NO_TRAILING_ZERO: Trailing zeros are removed from the fractional portion
100 // of the result in precision mode. Matches printf's %g.
101 // When EMIT_TRAILING_ZERO_AFTER_POINT is also given, one trailing zero is
102 // preserved.
103 // - EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL: when the input number has
104 // exactly one significant digit and is converted into exponent form then a
105 // trailing decimal point is appended to the significand in shortest mode
106 // or in precision mode with one requested digit.
107 // - EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL: in addition to a trailing
108 // decimal point emits a trailing '0'-character. This flag requires the
109 // EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL flag.
110 //
111 // Infinity symbol and nan_symbol provide the string representation for these
112 // special values. If the string is NULL and the special value is encountered
113 // then the conversion functions return false.
114 //
115 // The exponent_character is used in exponential representations. It is
116 // usually 'e' or 'E'.
117 //
118 // When converting to the shortest representation the converter will
119 // represent input numbers in decimal format if they are in the interval
120 // [10^decimal_in_shortest_low; 10^decimal_in_shortest_high[
121 // (lower boundary included, greater boundary excluded).
122 // Example: with decimal_in_shortest_low = -6 and
123 // decimal_in_shortest_high = 21:
124 // ToShortest(0.000001) -> "0.000001"
125 // ToShortest(0.0000001) -> "1e-7"
126 // ToShortest(111111111111111111111.0) -> "111111111111111110000"
127 // ToShortest(100000000000000000000.0) -> "100000000000000000000"
128 // ToShortest(1111111111111111111111.0) -> "1.1111111111111111e+21"
129 //
130 // When converting to precision mode the converter may add
131 // max_leading_padding_zeroes before returning the number in exponential
132 // format.
133 // Example with max_leading_padding_zeroes_in_precision_mode = 6.
134 // ToPrecision(0.0000012345, 2) -> "0.0000012"
135 // ToPrecision(0.00000012345, 2) -> "1.2e-7"
136 // Similarly the converter may add up to
137 // max_trailing_padding_zeroes_in_precision_mode in precision mode to avoid
138 // returning an exponential representation. A zero added by the
139 // EMIT_TRAILING_ZERO_AFTER_POINT flag is counted for this limit.
140 // Examples for max_trailing_padding_zeroes_in_precision_mode = 1:
141 // ToPrecision(230.0, 2) -> "230"
142 // ToPrecision(230.0, 2) -> "230." with EMIT_TRAILING_DECIMAL_POINT.
143 // ToPrecision(230.0, 2) -> "2.3e2" with EMIT_TRAILING_ZERO_AFTER_POINT.
144 //
145 // When converting numbers with exactly one significant digit to exponent
146 // form in shortest mode or in precision mode with one requested digit, the
147 // EMIT_TRAILING_DECIMAL_POINT and EMIT_TRAILING_ZERO_AFTER_POINT flags have
148 // no effect. Use the EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL flag to
149 // append a decimal point in this case and the
150 // EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL flag to also append a
151 // '0'-character in this case.
152 // Example with decimal_in_shortest_low = 0:
153 // ToShortest(0.0009) -> "9e-4"
154 // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL deactivated.
155 // ToShortest(0.0009) -> "9.e-4"
156 // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL activated.
157 // ToShortest(0.0009) -> "9.0e-4"
158 // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL activated and
159 // EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL activated.
160 //
161 // The min_exponent_width is used for exponential representations.
162 // The converter adds leading '0's to the exponent until the exponent
163 // is at least min_exponent_width digits long.
164 // The min_exponent_width is clamped to 5.
165 // As such, the exponent may never have more than 5 digits in total.
166 DoubleToStringConverter(int flags,
167 const char* infinity_symbol,
168 const char* nan_symbol,
169 char exponent_character,
170 int decimal_in_shortest_low,
171 int decimal_in_shortest_high,
172 int max_leading_padding_zeroes_in_precision_mode,
173 int max_trailing_padding_zeroes_in_precision_mode,
174 int min_exponent_width = 0)
175 : flags_(flags),
176 infinity_symbol_(infinity_symbol),
177 nan_symbol_(nan_symbol),
178 exponent_character_(exponent_character),
179 decimal_in_shortest_low_(decimal_in_shortest_low),
180 decimal_in_shortest_high_(decimal_in_shortest_high),
181 max_leading_padding_zeroes_in_precision_mode_(
182 max_leading_padding_zeroes_in_precision_mode),
183 max_trailing_padding_zeroes_in_precision_mode_(
184 max_trailing_padding_zeroes_in_precision_mode),
185 min_exponent_width_(min_exponent_width) {
186 // When 'trailing zero after the point' is set, then 'trailing point'
187 // must be set too.
188 DOUBLE_CONVERSION_ASSERT(((flags & EMIT_TRAILING_DECIMAL_POINT) != 0) ||
189 !((flags & EMIT_TRAILING_ZERO_AFTER_POINT) != 0));
190 }
191
192 // Returns a converter following the EcmaScript specification.
193 //
194 // Flags: UNIQUE_ZERO and EMIT_POSITIVE_EXPONENT_SIGN.
195 // Special values: "Infinity" and "NaN".
196 // Lower case 'e' for exponential values.
197 // decimal_in_shortest_low: -6
198 // decimal_in_shortest_high: 21
199 // max_leading_padding_zeroes_in_precision_mode: 6
200 // max_trailing_padding_zeroes_in_precision_mode: 0
201 static MFBT_API const DoubleToStringConverter& EcmaScriptConverter();
202
203 // Computes the shortest string of digits that correctly represent the input
204 // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
205 // (see constructor) it then either returns a decimal representation, or an
206 // exponential representation.
207 // Example with decimal_in_shortest_low = -6,
208 // decimal_in_shortest_high = 21,
209 // EMIT_POSITIVE_EXPONENT_SIGN activated, and
210 // EMIT_TRAILING_DECIMAL_POINT deactivated:
211 // ToShortest(0.000001) -> "0.000001"
212 // ToShortest(0.0000001) -> "1e-7"
213 // ToShortest(111111111111111111111.0) -> "111111111111111110000"
214 // ToShortest(100000000000000000000.0) -> "100000000000000000000"
215 // ToShortest(1111111111111111111111.0) -> "1.1111111111111111e+21"
216 //
217 // Note: the conversion may round the output if the returned string
218 // is accurate enough to uniquely identify the input-number.
219 // For example the most precise representation of the double 9e59 equals
220 // "899999999999999918767229449717619953810131273674690656206848", but
221 // the converter will return the shorter (but still correct) "9e59".
222 //
223 // Returns true if the conversion succeeds. The conversion always succeeds
224 // except when the input value is special and no infinity_symbol or
225 // nan_symbol has been given to the constructor.
226 //
227 // The length of the longest result is the maximum of the length of the
228 // following string representations (each with possible examples):
229 // - NaN and negative infinity: "NaN", "-Infinity", "-inf".
230 // - -10^(decimal_in_shortest_high - 1):
231 // "-100000000000000000000", "-1000000000000000.0"
232 // - the longest string in range [0; -10^decimal_in_shortest_low]. Generally,
233 // this string is 3 + kBase10MaximalLength - decimal_in_shortest_low.
234 // (Sign, '0', decimal point, padding zeroes for decimal_in_shortest_low,
235 // and the significant digits).
236 // "-0.0000033333333333333333", "-0.0012345678901234567"
237 // - the longest exponential representation. (A negative number with
238 // kBase10MaximalLength significant digits).
239 // "-1.7976931348623157e+308", "-1.7976931348623157E308"
240 // In addition, the buffer must be able to hold the trailing '\0' character.
241 bool ToShortest(double value, StringBuilder* result_builder) const {
242 return ToShortestIeeeNumber(value, result_builder, SHORTEST);
243 }
244
245 // Same as ToShortest, but for single-precision floats.
246 bool ToShortestSingle(float value, StringBuilder* result_builder) const {
247 return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
248 }
249
250
251 // Computes a decimal representation with a fixed number of digits after the
252 // decimal point. The last emitted digit is rounded.
253 //
254 // Examples:
255 // ToFixed(3.12, 1) -> "3.1"
256 // ToFixed(3.1415, 3) -> "3.142"
257 // ToFixed(1234.56789, 4) -> "1234.5679"
258 // ToFixed(1.23, 5) -> "1.23000"
259 // ToFixed(0.1, 4) -> "0.1000"
260 // ToFixed(1e30, 2) -> "1000000000000000019884624838656.00"
261 // ToFixed(0.1, 30) -> "0.100000000000000005551115123126"
262 // ToFixed(0.1, 17) -> "0.10000000000000001"
263 //
264 // If requested_digits equals 0, then the tail of the result depends on
265 // the EMIT_TRAILING_DECIMAL_POINT and EMIT_TRAILING_ZERO_AFTER_POINT.
266 // Examples, for requested_digits == 0,
267 // let EMIT_TRAILING_DECIMAL_POINT and EMIT_TRAILING_ZERO_AFTER_POINT be
268 // - false and false: then 123.45 -> 123
269 // 0.678 -> 1
270 // - true and false: then 123.45 -> 123.
271 // 0.678 -> 1.
272 // - true and true: then 123.45 -> 123.0
273 // 0.678 -> 1.0
274 //
275 // Returns true if the conversion succeeds. The conversion always succeeds
276 // except for the following cases:
277 // - the input value is special and no infinity_symbol or nan_symbol has
278 // been provided to the constructor,
279 // - 'value' > 10^kMaxFixedDigitsBeforePoint, or
280 // - 'requested_digits' > kMaxFixedDigitsAfterPoint.
281 // The last two conditions imply that the result for non-special values never
282 // contains more than
283 // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
284 // (one additional character for the sign, and one for the decimal point).
285 // In addition, the buffer must be able to hold the trailing '\0' character.
286 MFBT_API bool ToFixed(double value,
287 int requested_digits,
288 StringBuilder* result_builder) const;
289
290 // Computes a representation in exponential format with requested_digits
291 // after the decimal point. The last emitted digit is rounded.
292 // If requested_digits equals -1, then the shortest exponential representation
293 // is computed.
294 //
295 // Examples with EMIT_POSITIVE_EXPONENT_SIGN deactivated, and
296 // exponent_character set to 'e'.
297 // ToExponential(3.12, 1) -> "3.1e0"
298 // ToExponential(5.0, 3) -> "5.000e0"
299 // ToExponential(0.001, 2) -> "1.00e-3"
300 // ToExponential(3.1415, -1) -> "3.1415e0"
301 // ToExponential(3.1415, 4) -> "3.1415e0"
302 // ToExponential(3.1415, 3) -> "3.142e0"
303 // ToExponential(123456789000000, 3) -> "1.235e14"
304 // ToExponential(1000000000000000019884624838656.0, -1) -> "1e30"
305 // ToExponential(1000000000000000019884624838656.0, 32) ->
306 // "1.00000000000000001988462483865600e30"
307 // ToExponential(1234, 0) -> "1e3"
308 //
309 // Returns true if the conversion succeeds. The conversion always succeeds
310 // except for the following cases:
311 // - the input value is special and no infinity_symbol or nan_symbol has
312 // been provided to the constructor,
313 // - 'requested_digits' > kMaxExponentialDigits.
314 //
315 // The last condition implies that the result never contains more than
316 // kMaxExponentialDigits + 8 characters (the sign, the digit before the
317 // decimal point, the decimal point, the exponent character, the
318 // exponent's sign, and at most 3 exponent digits).
319 // In addition, the buffer must be able to hold the trailing '\0' character.
320 MFBT_API bool ToExponential(double value,
321 int requested_digits,
322 StringBuilder* result_builder) const;
323
324
325 // Computes 'precision' leading digits of the given 'value' and returns them
326 // either in exponential or decimal format, depending on
327 // max_{leading|trailing}_padding_zeroes_in_precision_mode (given to the
328 // constructor).
329 // The last computed digit is rounded.
330 //
331 // Example with max_leading_padding_zeroes_in_precision_mode = 6.
332 // ToPrecision(0.0000012345, 2) -> "0.0000012"
333 // ToPrecision(0.00000012345, 2) -> "1.2e-7"
334 // Similarly the converter may add up to
335 // max_trailing_padding_zeroes_in_precision_mode in precision mode to avoid
336 // returning an exponential representation. A zero added by the
337 // EMIT_TRAILING_ZERO_AFTER_POINT flag is counted for this limit.
338 // Examples for max_trailing_padding_zeroes_in_precision_mode = 1:
339 // ToPrecision(230.0, 2) -> "230"
340 // ToPrecision(230.0, 2) -> "230." with EMIT_TRAILING_DECIMAL_POINT.
341 // ToPrecision(230.0, 2) -> "2.3e2" with EMIT_TRAILING_ZERO_AFTER_POINT.
342 // Examples for max_trailing_padding_zeroes_in_precision_mode = 3, and no
343 // EMIT_TRAILING_ZERO_AFTER_POINT:
344 // ToPrecision(123450.0, 6) -> "123450"
345 // ToPrecision(123450.0, 5) -> "123450"
346 // ToPrecision(123450.0, 4) -> "123500"
347 // ToPrecision(123450.0, 3) -> "123000"
348 // ToPrecision(123450.0, 2) -> "1.2e5"
349 //
350 // Returns true if the conversion succeeds. The conversion always succeeds
351 // except for the following cases:
352 // - the input value is special and no infinity_symbol or nan_symbol has
353 // been provided to the constructor,
354 // - precision < kMinPericisionDigits
355 // - precision > kMaxPrecisionDigits
356 //
357 // The last condition implies that the result never contains more than
358 // kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the
359 // exponent character, the exponent's sign, and at most 3 exponent digits).
360 // In addition, the buffer must be able to hold the trailing '\0' character.
361 MFBT_API bool ToPrecision(double value,
362 int precision,
363 StringBuilder* result_builder) const;
364
365 enum DtoaMode {
366 // Produce the shortest correct representation.
367 // For example the output of 0.299999999999999988897 is (the less accurate
368 // but correct) 0.3.
369 SHORTEST,
370 // Same as SHORTEST, but for single-precision floats.
371 SHORTEST_SINGLE,
372 // Produce a fixed number of digits after the decimal point.
373 // For instance fixed(0.1, 4) becomes 0.1000
374 // If the input number is big, the output will be big.
375 FIXED,
376 // Fixed number of digits (independent of the decimal point).
377 PRECISION
378 };
379
380 // Converts the given double 'v' to digit characters. 'v' must not be NaN,
381 // +Infinity, or -Infinity. In SHORTEST_SINGLE-mode this restriction also
382 // applies to 'v' after it has been casted to a single-precision float. That
383 // is, in this mode static_cast<float>(v) must not be NaN, +Infinity or
384 // -Infinity.
385 //
386 // The result should be interpreted as buffer * 10^(point-length).
387 //
388 // The digits are written to the buffer in the platform's charset, which is
389 // often UTF-8 (with ASCII-range digits) but may be another charset, such
390 // as EBCDIC.
391 //
392 // The output depends on the given mode:
393 // - SHORTEST: produce the least amount of digits for which the internal
394 // identity requirement is still satisfied. If the digits are printed
395 // (together with the correct exponent) then reading this number will give
396 // 'v' again. The buffer will choose the representation that is closest to
397 // 'v'. If there are two at the same distance, than the one farther away
398 // from 0 is chosen (halfway cases - ending with 5 - are rounded up).
399 // In this mode the 'requested_digits' parameter is ignored.
400 // - SHORTEST_SINGLE: same as SHORTEST but with single-precision.
401 // - FIXED: produces digits necessary to print a given number with
402 // 'requested_digits' digits after the decimal point. The produced digits
403 // might be too short in which case the caller has to fill the remainder
404 // with '0's.
405 // Example: toFixed(0.001, 5) is allowed to return buffer="1", point=-2.
406 // Halfway cases are rounded towards +/-Infinity (away from 0). The call
407 // toFixed(0.15, 2) thus returns buffer="2", point=0.
408 // The returned buffer may contain digits that would be truncated from the
409 // shortest representation of the input.
410 // - PRECISION: produces 'requested_digits' where the first digit is not '0'.
411 // Even though the length of produced digits usually equals
412 // 'requested_digits', the function is allowed to return fewer digits, in
413 // which case the caller has to fill the missing digits with '0's.
414 // Halfway cases are again rounded away from 0.
415 // DoubleToAscii expects the given buffer to be big enough to hold all
416 // digits and a terminating null-character. In SHORTEST-mode it expects a
417 // buffer of at least kBase10MaximalLength + 1. In all other modes the
418 // requested_digits parameter and the padding-zeroes limit the size of the
419 // output. Don't forget the decimal point, the exponent character and the
420 // terminating null-character when computing the maximal output size.
421 // The given length is only used in debug mode to ensure the buffer is big
422 // enough.
423 static MFBT_API void DoubleToAscii(double v,
424 DtoaMode mode,
425 int requested_digits,
426 char* buffer,
427 int buffer_length,
428 bool* sign,
429 int* length,
430 int* point);
431
432 private:
433 // Implementation for ToShortest and ToShortestSingle.
434 MFBT_API bool ToShortestIeeeNumber(double value,
435 StringBuilder* result_builder,
436 DtoaMode mode) const;
437
438 // If the value is a special value (NaN or Infinity) constructs the
439 // corresponding string using the configured infinity/nan-symbol.
440 // If either of them is NULL or the value is not special then the
441 // function returns false.
442 MFBT_API bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
443 // Constructs an exponential representation (i.e. 1.234e56).
444 // The given exponent assumes a decimal point after the first decimal digit.
445 MFBT_API void CreateExponentialRepresentation(const char* decimal_digits,
446 int length,
447 int exponent,
448 StringBuilder* result_builder) const;
449 // Creates a decimal representation (i.e 1234.5678).
450 MFBT_API void CreateDecimalRepresentation(const char* decimal_digits,
451 int length,
452 int decimal_point,
453 int digits_after_point,
454 StringBuilder* result_builder) const;
455
456 const int flags_;
457 const char* const infinity_symbol_;
458 const char* const nan_symbol_;
459 const char exponent_character_;
460 const int decimal_in_shortest_low_;
461 const int decimal_in_shortest_high_;
462 const int max_leading_padding_zeroes_in_precision_mode_;
463 const int max_trailing_padding_zeroes_in_precision_mode_;
464 const int min_exponent_width_;
465
466 DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS(DoubleToStringConverter);
467 };
468
469 } // namespace double_conversion
470
471 #endif // DOUBLE_CONVERSION_DOUBLE_TO_STRING_H_