Repository navigation
fix: parse quantities independently of the host locale - #1036
Merged
Merged
Conversation
andiwand
force-pushed
the
review/17-crypto-blocks
branch
from
October 4, 2026 21:18
2728d90 to
44e177f
Compare
The shortened comments lost reasons that the code does not show: why format_magnitude uses 7 digits, why the default unit is registered, that number::parse refuses a unit, and that extra digits show float noise. Each reason is back in one or two lines. quantity.cpp also includes string_util.hpp, because it uses is_ascii_digit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
andiwand
force-pushed
the
review/18-quantity-parsing
branch
from
October 5, 2026 05:58
2b39e8e to
28a6be0
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.
🤖 Generated with Claude Code
Quantity parsing now reads decimal magnitudes independently of the host locale, preserving exponent notation and units such as
em. Integral magnitudes are checked before conversion and format without locale grouping. Significant-digit arithmetic uses fixed-width integers and cannot overflow on extreme precision arguments.Validation: 93 numeric and HTML tests pass; public headers compile as C++20. Regressions cover comma-decimal locales, grouped integer output, exponent/unit boundaries, and conversion limits.