#include <double-conversion.h>
Public Types | |
| enum | Flags { NO_FLAGS = 0, EMIT_POSITIVE_EXPONENT_SIGN = 1, EMIT_TRAILING_DECIMAL_POINT = 2, EMIT_TRAILING_ZERO_AFTER_POINT = 4, UNIQUE_ZERO = 8 } |
| enum | DtoaMode { SHORTEST, SHORTEST_SINGLE, FIXED, PRECISION } |
Public Member Functions | |
| DoubleToStringConverter (int flags, const char *infinity_symbol, const char *nan_symbol, char exponent_character, int decimal_in_shortest_low, int decimal_in_shortest_high, int max_leading_padding_zeroes_in_precision_mode, int max_trailing_padding_zeroes_in_precision_mode) | |
| bool | ToShortest (double value, StringBuilder *result_builder) const |
| bool | ToShortestSingle (float value, StringBuilder *result_builder) const |
| bool | ToFixed (double value, int requested_digits, StringBuilder *result_builder) const |
| bool | ToExponential (double value, int requested_digits, StringBuilder *result_builder) const |
| bool | ToPrecision (double value, int precision, StringBuilder *result_builder) const |
Static Public Member Functions | |
| static const DoubleToStringConverter & | EcmaScriptConverter () |
| static void | DoubleToAscii (double v, DtoaMode mode, int requested_digits, char *buffer, int buffer_length, bool *sign, int *length, int *point) |
Static Public Attributes | |
| static const int | kMaxFixedDigitsBeforePoint = 60 |
| static const int | kMaxFixedDigitsAfterPoint = 60 |
| static const int | kMaxExponentialDigits = 120 |
| static const int | kMinPrecisionDigits = 1 |
| static const int | kMaxPrecisionDigits = 120 |
| static const int | kBase10MaximalLength = 17 |
Definition at line 35 of file double-conversion.h.
Definition at line 274 of file double-conversion.h.
| NO_FLAGS | |
| EMIT_POSITIVE_EXPONENT_SIGN | |
| EMIT_TRAILING_DECIMAL_POINT | |
| EMIT_TRAILING_ZERO_AFTER_POINT | |
| UNIQUE_ZERO |
Definition at line 53 of file double-conversion.h.
| double_conversion::DoubleToStringConverter::DoubleToStringConverter | ( | int | flags, | |
| const char * | infinity_symbol, | |||
| const char * | nan_symbol, | |||
| char | exponent_character, | |||
| int | decimal_in_shortest_low, | |||
| int | decimal_in_shortest_high, | |||
| int | max_leading_padding_zeroes_in_precision_mode, | |||
| int | max_trailing_padding_zeroes_in_precision_mode | |||
| ) | [inline] |
Definition at line 107 of file double-conversion.h.
References ASSERT, EMIT_TRAILING_DECIMAL_POINT, and EMIT_TRAILING_ZERO_AFTER_POINT.
| void double_conversion::DoubleToStringConverter::DoubleToAscii | ( | double | v, | |
| DtoaMode | mode, | |||
| int | requested_digits, | |||
| char * | buffer, | |||
| int | buffer_length, | |||
| bool * | sign, | |||
| int * | length, | |||
| int * | point | |||
| ) | [static] |
Definition at line 356 of file double-conversion.cc.
References ASSERT, double_conversion::BignumDtoa(), double_conversion::FAST_DTOA_PRECISION, double_conversion::FAST_DTOA_SHORTEST, double_conversion::FAST_DTOA_SHORTEST_SINGLE, double_conversion::FastDtoa(), double_conversion::FastFixedDtoa(), FIXED, PRECISION, SHORTEST, SHORTEST_SINGLE, and UNREACHABLE.
Referenced by ToExponential(), ToFixed(), and ToPrecision().


| const DoubleToStringConverter & double_conversion::DoubleToStringConverter::EcmaScriptConverter | ( | ) | [static] |
Definition at line 42 of file double-conversion.cc.
References MosesTuning::converter, EMIT_POSITIVE_EXPONENT_SIGN, and UNIQUE_ZERO.
| bool double_conversion::DoubleToStringConverter::ToExponential | ( | double | value, | |
| int | requested_digits, | |||
| StringBuilder * | result_builder | |||
| ) | const |
Definition at line 235 of file double-conversion.cc.
References double_conversion::StringBuilder::AddCharacter(), ASSERT, DoubleToAscii(), kBase10MaximalLength, kMaxExponentialDigits, PRECISION, SHORTEST, and UNIQUE_ZERO.

| bool double_conversion::DoubleToStringConverter::ToFixed | ( | double | value, | |
| int | requested_digits, | |||
| StringBuilder * | result_builder | |||
| ) | const |
Definition at line 199 of file double-conversion.cc.
References double_conversion::StringBuilder::AddCharacter(), ASSERT, DoubleToAscii(), FIXED, kMaxFixedDigitsAfterPoint, kMaxFixedDigitsBeforePoint, and UNIQUE_ZERO.

| bool double_conversion::DoubleToStringConverter::ToPrecision | ( | double | value, | |
| int | precision, | |||
| StringBuilder * | result_builder | |||
| ) | const |
Definition at line 284 of file double-conversion.cc.
References double_conversion::StringBuilder::AddCharacter(), ASSERT, DoubleToAscii(), EMIT_TRAILING_ZERO_AFTER_POINT, kMaxPrecisionDigits, PRECISION, and UNIQUE_ZERO.

| bool double_conversion::DoubleToStringConverter::ToShortest | ( | double | value, | |
| StringBuilder * | result_builder | |||
| ) | const [inline] |
| bool double_conversion::DoubleToStringConverter::ToShortestSingle | ( | float | value, | |
| StringBuilder * | result_builder | |||
| ) | const [inline] |
const int double_conversion::DoubleToStringConverter::kBase10MaximalLength = 17 [static] |
const int double_conversion::DoubleToStringConverter::kMaxExponentialDigits = 120 [static] |
const int double_conversion::DoubleToStringConverter::kMaxFixedDigitsAfterPoint = 60 [static] |
const int double_conversion::DoubleToStringConverter::kMaxFixedDigitsBeforePoint = 60 [static] |
const int double_conversion::DoubleToStringConverter::kMaxPrecisionDigits = 120 [static] |
const int double_conversion::DoubleToStringConverter::kMinPrecisionDigits = 1 [static] |
Definition at line 50 of file double-conversion.h.
1.5.9