Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wrapping_neg() to avoid fma errors on underflow #269

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

ajtribick
Copy link
Contributor

Based on the C semantics for uint64_t, the negations here should be wrapping_neg, this fixes the test case to match the output I get from the standard library's f64::mul_add.

Resolves #268

@Amanieu
Copy link
Member

Amanieu commented Oct 1, 2022

Thanks!

@Amanieu Amanieu merged commit 593764b into rust-lang:master Oct 1, 2022
@ajtribick ajtribick deleted the fma_wrapping_neg branch October 1, 2022 17:56
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.

Attempt to negate with overflow in fma
2 participants