From b18cbc795ffb6d2c96d533633317b02b155e9c3b Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Wed, 18 Feb 2026 11:48:04 -0800 Subject: [PATCH] Default enable precision_preserving_double_format. PiperOrigin-RevId: 871973805 --- conformance/BUILD | 6 ++++++ eval/public/cel_options.h | 2 +- runtime/runtime_options.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conformance/BUILD b/conformance/BUILD index ec8d55f1f..ba485f36d 100644 --- a/conformance/BUILD +++ b/conformance/BUILD @@ -196,6 +196,9 @@ _TESTS_TO_SKIP_MODERN = [ # configured timezone database. "timestamps/timestamp_selectors_tz/getDayOfMonth_name_pos", "timestamps/timestamp_selectors_tz/getDayOfYear", + # These depend on using charconv (or equivalent) to format doubles with shortest possible + # precision to preserve value. Not available on older compilers. + "conversions/string/double_hard", ] _TESTS_TO_SKIP_MODERN_DASHBOARD = [ @@ -246,6 +249,9 @@ _TESTS_TO_SKIP_LEGACY = [ # configured timezone database. "timestamps/timestamp_selectors_tz/getDayOfMonth_name_pos", "timestamps/timestamp_selectors_tz/getDayOfYear", + # These depend on using charconv (or equivalent) to format doubles with shortest possible + # precision to preserve value. Not available on older compilers. + "conversions/string/double_hard", # cel.@block "block_ext/basic/optional_list", diff --git a/eval/public/cel_options.h b/eval/public/cel_options.h index 918c3c1ab..779839583 100644 --- a/eval/public/cel_options.h +++ b/eval/public/cel_options.h @@ -211,7 +211,7 @@ struct InterpreterOptions { // // Otherwise, will fall back to formatting with the worst-case required // precision. - bool enable_precision_preserving_double_format = false; + bool enable_precision_preserving_double_format = true; }; // LINT.ThenChange(//depot/google3/runtime/runtime_options.h) diff --git a/runtime/runtime_options.h b/runtime/runtime_options.h index 8a3708e55..1e18fef95 100644 --- a/runtime/runtime_options.h +++ b/runtime/runtime_options.h @@ -181,7 +181,7 @@ struct RuntimeOptions { // precision. // // If disabled, will use the legacy behavior of rounding to 6 decimal places. - bool enable_precision_preserving_double_format = false; + bool enable_precision_preserving_double_format = true; }; // LINT.ThenChange(//depot/google3/eval/public/cel_options.h)