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

Tests do not work on i386 due to use of float128 #753

Closed
jeremysanders opened this issue May 16, 2022 · 3 comments
Closed

Tests do not work on i386 due to use of float128 #753

jeremysanders opened this issue May 16, 2022 · 3 comments

Comments

@jeremysanders
Copy link
Contributor

On the Linux i386 platform (at least), the data type numpy.float128 does not exist. This causes the test test_cost.py to fail. I believe float128 is being used to map to long double in C++. numpy/numpy#10288, suggests that the data type numpy.longdouble should likely be used instead of float128, as long double is not an ieee128 datatype on that platform.

See https://gist.github.com/jeremysanders/9aca53cfccd5414d43f9f33eae911287 for a patch.

@HDembinski
Copy link
Member

Thank you for this bug report, but I think the correct treatment is to skip this test on platforms that do not support this data type. Is there a way to check whether numpy supports numpy.float128 that can be used as a requirement for the test?

@jeremysanders
Copy link
Contributor Author

I don't agree, as the test works anywhere fine if the data type is changed. The C data type is long double, so why not use the correct data type in iminuit? There's no guarantee that a long double is a float182. In addition, the presence of float128 doesn't mean that a long double has this same data type.

@HDembinski
Copy link
Member

The test is explicitly for the type float128. A long double is not guaranteed to have 128 bits.

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

No branches or pull requests

2 participants