Skip to content

x86: fixed testing equality of floating point numbers #150

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

Merged
merged 3 commits into from
Oct 25, 2017

Conversation

mrowqa
Copy link
Contributor

@mrowqa mrowqa commented Oct 24, 2017

Hi,

I have run the tests and five of them failed. I checked the Intel Intrinsics Guide and it said that these specific instructions returns approximated values while the tests don't take the error into account. I have Ryzen 1700X. I guess all of test runs until now could be done on Intel CPUs where it could possibly always return those hardcoded specific values.

I also haven't known how to cleanly make the compare, so I have added an extra macro. It is basically copy-paste of this since I didn't want to add new dependencies.

@alexcrichton
Copy link
Member

Thanks! Looks like CI is failing though?

@mrowqa
Copy link
Contributor Author

mrowqa commented Oct 25, 2017

It was still building when I went sleep. I haven't marked the new auxiliary macro as used only in tests, so normal build emitted unused macro warning. Now it should be fixed.

@alexcrichton
Copy link
Member

Awesome, thanks!

@alexcrichton alexcrichton merged commit a53b50a into rust-lang:master Oct 25, 2017
@mrowqa mrowqa deleted the accuracy-fix branch October 25, 2017 14:19
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.

2 participants