Repository navigation
Deprecate tsl::strings::LegacyPrecision in favor of absl::HighPrecision. - #3666
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_1003771966
branch
2 times, most recently
from
October 21, 2026 17:36
00eeebc to
6f93d5c
Compare
…ision`. `LegacyPrecision(float)` and `LegacyPrecision(double)` now forward to `absl::HighPrecision`, and the custom `FpToBuffer` implementation is removed. This is a value-preserving but not byte-identical change in formatting: - float: the old implementation used %.6g and fell back to %.9g. absl uses the shortest of 6-9 significant digits that round-trips, e.g. 1.17549435e-38f is now printed as "1.1754944e-38". This matches what the header comment already documented (%.6g, %.7g, %.8g, or %.9g). - double: unchanged (%.15g, falling back to %.17g). - NaN with the sign bit set is now printed as "nan" instead of "-nan". All outputs still round-trip to the exact same value. PiperOrigin-RevId: 1004642809
copybara-service
Bot
force-pushed
the
test_1003771966
branch
from
October 22, 2026 10:32
6f93d5c to
9d624ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deprecate
tsl::strings::LegacyPrecisionin favor ofabsl::HighPrecision.LegacyPrecision(float)andLegacyPrecision(double)now forward toabsl::HighPrecision, and the customFpToBufferimplementation is removed.This is a value-preserving but not byte-identical change in formatting:
the shortest of 6-9 significant digits that round-trips, e.g.
1.17549435e-38f is now printed as "1.1754944e-38". This matches what the
header comment already documented (%.6g, %.7g, %.8g, or %.9g).
All outputs still round-trip to the exact same value.