Skip to content

Commit 707dbe3

Browse files
jnthntatumcopybara-github
authored andcommitted
Default enable precision_preserving_double_format.
PiperOrigin-RevId: 871973805
1 parent 318fef0 commit 707dbe3

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

conformance/BUILD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ _TESTS_TO_SKIP_MODERN = [
196196
# configured timezone database.
197197
"timestamps/timestamp_selectors_tz/getDayOfMonth_name_pos",
198198
"timestamps/timestamp_selectors_tz/getDayOfYear",
199+
# These depend on using charconv (or equivalent) to format doubles with shortest possible
200+
# precision to preserve value. Not available on older compilers.
201+
"conversions/string/double_hard",
199202
]
200203

201204
_TESTS_TO_SKIP_MODERN_DASHBOARD = [
@@ -246,6 +249,9 @@ _TESTS_TO_SKIP_LEGACY = [
246249
# configured timezone database.
247250
"timestamps/timestamp_selectors_tz/getDayOfMonth_name_pos",
248251
"timestamps/timestamp_selectors_tz/getDayOfYear",
252+
# These depend on using charconv (or equivalent) to format doubles with shortest possible
253+
# precision to preserve value. Not available on older compilers.
254+
"conversions/string/double_hard",
249255

250256
# cel.@block
251257
"block_ext/basic/optional_list",

eval/public/cel_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ struct InterpreterOptions {
211211
//
212212
// Otherwise, will fall back to formatting with the worst-case required
213213
// precision.
214-
bool enable_precision_preserving_double_format = false;
214+
bool enable_precision_preserving_double_format = true;
215215
};
216216
// LINT.ThenChange(//depot/google3/runtime/runtime_options.h)
217217

runtime/runtime_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ struct RuntimeOptions {
181181
// precision.
182182
//
183183
// If disabled, will use the legacy behavior of rounding to 6 decimal places.
184-
bool enable_precision_preserving_double_format = false;
184+
bool enable_precision_preserving_double_format = true;
185185
};
186186
// LINT.ThenChange(//depot/google3/eval/public/cel_options.h)
187187

0 commit comments

Comments
 (0)