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

This updates the exponent calculations done in the nextafter functions to match their MUSL counterparts #287

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

keram88
Copy link
Contributor

@keram88 keram88 commented Oct 31, 2023

Hello,

As detailed in #286, the nextafter family of functions incorrectly computes exponents, leading to potential missed underflow/overflow signals relative to the MUSL implementations. This updates these calculations to match the calculations as found in the MUSL implementations. I don't know how to write a test for these changes without access to the floating point environment.

Thanks,
Mark

Fixes #286

…s related

to detecting underflow/overflow. The functions now match the behavior of the
MUSL implementations these were based on.

Fixes rust-lang#286
@Amanieu Amanieu merged commit cb2ffdf into rust-lang:master Nov 1, 2023
12 checks passed
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.

Incorrect exponent calculation in the nextafter implementations leads to missed overflow/underflow signals
2 participants