-
Notifications
You must be signed in to change notification settings - Fork 120
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
numpy/vector.c: remove usage of fpclassify #636
Conversation
Fixes v923z#635 Verified by re-compiling circuitpython with this change.
Under the C standard, I think both the original code and the replacement code should give correct results. According to the C99 standard, the fpclassify macro accepts arguments of any "real floating-point type". That is, arguments of "float" or "double" type are both equally appropriate. Of course, we have to live with compilers actually "in production". That said, based on your kernel version I checked whether Ubuntu 18.04 gave such an error and I didn't reproduce it. I am curious what specific compiler you are using. When I implemented The failed builds appear to be due to a bug in the CI commands in ulab. Per documentation of github actions, it is needed to run "apt-get update" before "apt-get install". actions/runner-images#2924 |
Right - maybe Re: compiler version and possible options triggering the issue - it looks like the CP build disables
The full command that fails for this version:
I was also able to narrow the issue to being triggered when using
Testing other options that seemed suspicious (like |
This fails on the |
Ah, OK, adding It's unfortunate, because fpclassify is a useful function and when implemented according to the C99 standard does not perform any float conversion. I don't expect prompt action but I did file a bug with the gcc folks related to this: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110703 -- there are several similar bugs that have not seen action over the course of years, unfortunately. |
Fixes #635
Verified by re-compiling circuitpython with this change.