Skip to content

Conversation

LorrensP-2158466
Copy link
Contributor

Adds APPROX_DELTA to 2 tests of f32::log reported in #miri > Miri test-libstd Failure (2025-08).

I changed 2 lines, the first one is the actual failure. The second one is precautionary.

@rustbot
Copy link
Collaborator

rustbot commented Aug 31, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 31, 2025
@LorrensP-2158466
Copy link
Contributor Author

r? @RalfJung

@rustbot rustbot assigned RalfJung and unassigned ibraheemdev Aug 31, 2025
assert_approx_eq!(10.0f32.log(10.0), 1.0);
assert_approx_eq!(2.3f32.log(3.5), 0.664858);
assert_approx_eq!(10.0f32.log(10.0), 1.0, APPROX_DELTA);
assert_approx_eq!(2.3f32.log(3.5), 0.664858, APPROX_DELTA);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If 10.log(10) fails, then this one will fail eventually, so I used APPROX_DELTA here as well.

@RalfJung
Copy link
Member

Thanks!
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 31, 2025

📌 Commit cfba491 has been approved by RalfJung

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 31, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 31, 2025
…r=RalfJung

Change std f32 test to pass under Miri

Adds `APPROX_DELTA` to 2 tests of `f32::log` reported in [#miri > Miri test-libstd Failure (2025-08)](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-08.29).

I changed 2 lines, the first one is the actual failure. The second one is precautionary.
bors added a commit that referenced this pull request Aug 31, 2025
Rollup of 3 pull requests

Successful merges:

 - #145968 (Add `Bound::copied`)
 - #146046 (Suggest method name with maybe ty mismatch)
 - #146051 (Change std f32 test to pass under Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 1, 2025
Rollup of 6 pull requests

Successful merges:

 - #145421 (`dump_mir` cleanups)
 - #145968 (Add `Bound::copied`)
 - #146004 (resolve: Refactor `struct ExternPreludeEntry`)
 - #146042 (Detect negative literal inferred to unsigned integer)
 - #146046 (Suggest method name with maybe ty mismatch)
 - #146051 (Change std f32 test to pass under Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0dbd8e6 into rust-lang:master Sep 1, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Sep 1, 2025
Rollup merge of #146051 - LorrensP-2158466:miri-libstd-fix, r=RalfJung

Change std f32 test to pass under Miri

Adds `APPROX_DELTA` to 2 tests of `f32::log` reported in [#miri > Miri test-libstd Failure (2025-08)](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-08.29).

I changed 2 lines, the first one is the actual failure. The second one is precautionary.
@rustbot rustbot added this to the 1.91.0 milestone Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants