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

{f32,f64,float}::tests::test_abs_sub unit tests in libstd fail on Windows #8663

Closed
vadimcn opened this issue Aug 21, 2013 · 1 comment
Closed
Labels
O-windows Operating system: Windows

Comments

@vadimcn
Copy link
Contributor

vadimcn commented Aug 21, 2013

f32::tests::test_abs_sub, f64::tests::test_abs_sub and float::tests::test_abs_sub in libstd fail this assertion: assert!(NaN.abs_sub(&-1f32).is_NaN()); (the result is 0 instead of NaN)

This is because mingw's implementation of underlying function fdim() does not take NaNs into account:

double fdim (double x, double y)
{
  return  (isgreater(x, y) ? (x - y) : 0.0);
}
@vadimcn
Copy link
Contributor Author

vadimcn commented Aug 21, 2013

Apparently this has been fixed in mingw-w64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant