Skip to content

Conversation

@quaternic
Copy link
Contributor

@quaternic quaternic commented Sep 25, 2025

Resolve the severe imprecision (~2%) that is due to inconsistent rounding.

Closes: #1021

Comment on lines 63 to 67

macro_rules! x87exp {
($float_ty:ident, $word_size:literal, $fn_name:ident, $load_op:literal) => {
pub fn $fn_name(mut x: $float_ty) -> $float_ty { unsafe {
core::arch::asm!(
Copy link
Contributor

Choose a reason for hiding this comment

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

You mentioned async and at #1021 that the results can be platform-dependent. I think this is worth putting in a comment in case anybody runs into it. Hopefully nobody ever will, but a hint would be nice if it shows up.

Otherwise, LGTM.

@tgross35
Copy link
Contributor

tgross35 commented Dec 6, 2025 via email

@tgross35 tgross35 enabled auto-merge (squash) December 6, 2025 06:54
@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35 tgross35 merged commit 3034207 into rust-lang:main Dec 6, 2025
38 checks passed
@quaternic quaternic deleted the x87-exp branch December 6, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Precision of exp2f on x86 without SSE

3 participants