Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Fix substract with borrow in FMA #252

Merged
merged 2 commits into from
Jun 25, 2021
Merged

Conversation

jethrogb
Copy link

Fixes #242

I assume there's a good reason we're not just using u128 math here.

@jethrogb
Copy link
Author

@Lokathor could you review this? This is resulting in std test failures on tier 2 targets.

@Lokathor
Copy link
Contributor

This change looks reasonable at a glance.

I know the test failures aren't part of this PR, but if you could fix them up that would be appreciated. I can have a proper look at things in about 10hrs from now.

@jethrogb
Copy link
Author

Pushed some changes

@@ -218,6 +218,14 @@ mod tests {
-0.00000000000000022204460492503126,
);

assert_eq!(fma(-0.992, -0.992, -0.992), -0.00793599999988632,);
assert_eq!(fma(-0.992, -0.992, -0.992), -0.007936000000000007,);
Copy link
Author

Choose a reason for hiding this comment

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

This is the result from GNU libm

@jethrogb
Copy link
Author

The following tests also fail on master:

  • lgammaf_matches_musl
  • tgamma_matches_musl
  • y0f_matches_musl
  • y0_matches_musl
  • lgamma_matches_musl

Fixing these seems like a rabbit hole that I don't want to do.

@Lokathor
Copy link
Contributor

Oh boy. Yeah none of that is your fault, I thought it was just some extra warnings and stuff.

@Lokathor Lokathor self-requested a review June 25, 2021 02:20
@Lokathor Lokathor merged commit c2d22bf into rust-lang:master Jun 25, 2021
tgross35 pushed a commit that referenced this pull request Apr 18, 2025
Fix substract with borrow in FMA
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FMA implementation producing incorrect results
2 participants