test: update duplicate many_digits test to use f64 instead of f32#149744
Merged
bors merged 1 commit intorust-lang:mainfrom Dec 15, 2025
Merged
test: update duplicate many_digits test to use f64 instead of f32#149744bors merged 1 commit intorust-lang:mainfrom
bors merged 1 commit intorust-lang:mainfrom
Conversation
Replace the f32 test case with an f64 equivalent to improve coverage for parsing large digit counts in double-precision floating-point conversion.
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
Member
|
Any reason to replace the test rather than adding a new one with the f64 case? That seems better to me, though I'm not familiar with this particular area of code. |
Contributor
Author
There were two f32 tests, but really just one duplicated. This PR replaces one of the f32 tests by the equivalent f64 test, thus improving coverage. It seems that this PR was the original goal. |
Member
|
@bors r+ Sounds good, thanks! |
Collaborator
bors
added a commit
that referenced
this pull request
Dec 15, 2025
Rollup of 7 pull requests Successful merges: - #149744 (test: update duplicate many_digits test to use f64 instead of f32) - #149946 (mir_build: Move and rename code for partitioning match candidates) - #149987 (Move ambient cdb discovery from compiletest to bootstrap) - #149990 (Improve amdgpu docs: Mention device-libs and xnack) - #149994 (Allow vector types for amdgpu) - #149997 (Link POSIX instead of Linux manual for Instant) - #150010 (Correct library linking for hexagon targets in run-make tests) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Dec 15, 2025
Rollup merge of #149744 - lemire:main, r=Mark-Simulacrum test: update duplicate many_digits test to use f64 instead of f32 Replace the f32 test case with an f64 equivalent to improve coverage for parsing large digit counts in double-precision floating-point conversion. Specifically, this PR updates the `many_digits` test in `library/coretests/tests/num/dec2flt/parse.rs` to test f64 (double-precision) parsing instead of f32 (single-precision). The test verifies that decimal strings with an excessive number of digits (beyond `Decimal::MAX_DIGITS`) are parsed correctly, ensuring proper truncation of insignificant digits. Previously, the same test was repeated twice (see comment #86761 (comment) by `@Viatorus).` ## Changes - Replaced the duplicated f32 test case with an equivalent f64 test case. - Updated the expected bit pattern and input string to a very long decimal with many trailing zeros, testing the limits of f64 precision.
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.
Replace the f32 test case with an f64 equivalent to improve coverage for parsing large digit counts in double-precision floating-point conversion. Specifically, this PR updates the
many_digitstest inlibrary/coretests/tests/num/dec2flt/parse.rsto test f64 (double-precision) parsing instead of f32 (single-precision).The test verifies that decimal strings with an excessive number of digits (beyond
Decimal::MAX_DIGITS) are parsed correctly, ensuring proper truncation of insignificant digits. Previously, the same test was repeated twice (see comment #86761 (comment) by @Viatorus).Changes